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

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: Addressed comments by Sven Panne. 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
« no previous file with comments | « src/api.cc ('k') | src/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 596b480b70f8526956264cc2d10b5f6511f0a351..65012e390888dcc7cadb33ce50c13c485cbd224d 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -303,14 +303,9 @@ 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);
- if (InstallExtensions(env, extensions)) {
- return env;
- }
- }
- return Handle<Context>();
+ Handle<Context> env = genesis.result();
+ if (env.is_null() || !InstallExtensions(env, extensions)) Handle<Context>();
Sven Panne 2013/04/09 13:52:28 A "return" might be helpful here... ;-)
Michael Starzinger 2013/04/10 09:01:11 Done. Yeah, a "return" might come in handy here. :
+ return scope.CloseAndEscape(env);
}
« no previous file with comments | « src/api.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698