Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: src/compiler.cc

Issue 10697094: Add a second kind of HandleScope that ties the lifetime of Handles created in its scope to the life… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.h ('k') | src/handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 1499277fb27a5c341c0f3d30741a50ec8a5d0a2e..e282a7f87c67fed74dba9b22b715ccb057e987c6 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -61,7 +61,8 @@ CompilationInfo::CompilationInfo(Handle<Script> script, Zone* zone)
extension_(NULL),
pre_parse_data_(NULL),
osr_ast_id_(AstNode::kNoNumber),
- zone_(zone) {
+ zone_(zone),
+ deferred_handles_(NULL) {
Initialize(BASE);
}
@@ -79,7 +80,8 @@ CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info,
extension_(NULL),
pre_parse_data_(NULL),
osr_ast_id_(AstNode::kNoNumber),
- zone_(zone) {
+ zone_(zone),
+ deferred_handles_(NULL) {
Initialize(BASE);
}
@@ -97,11 +99,17 @@ CompilationInfo::CompilationInfo(Handle<JSFunction> closure, Zone* zone)
extension_(NULL),
pre_parse_data_(NULL),
osr_ast_id_(AstNode::kNoNumber),
- zone_(zone) {
+ zone_(zone),
+ deferred_handles_(NULL) {
Initialize(BASE);
}
+CompilationInfo::~CompilationInfo() {
+ delete deferred_handles_;
+}
+
+
// Disable optimization for the rest of the compilation pipeline.
void CompilationInfo::DisableOptimization() {
bool is_optimizable_closure =
« no previous file with comments | « src/compiler.h ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698