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

Unified Diff: src/bootstrapper.cc

Issue 13799003: Change Context::New not create persistent handles. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 596b480b70f8526956264cc2d10b5f6511f0a351..f40aa456ef9e858a16398caf3cb9fd7690fe681f 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -303,11 +303,10 @@ Handle<Context> Bootstrapper::CreateEnvironment(
v8::ExtensionConfiguration* extensions) {
HandleScope scope(isolate_);
Genesis genesis(isolate_, global_object, global_template, extensions);
- if (!genesis.result().is_null()) {
- Handle<Object> ctx(isolate_->global_handles()->Create(*genesis.result()));
- Handle<Context> env = Handle<Context>::cast(ctx);
+ Handle<Context> env = genesis.result();
+ if (!env.is_null()) {
if (InstallExtensions(env, extensions)) {
Sven Panne 2013/04/09 07:08:33 Merge the "if"s, move the last "return" to an "els
Michael Starzinger 2013/04/09 13:29:18 Done.
- return env;
+ return scope.CloseAndEscape(env);
}
}
return Handle<Context>();

Powered by Google App Engine
This is Rietveld 408576698