Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 58b2ad0387b4bf50b439e437bdea75fb1b760ff1..ce58a86cf5de1e8fbc529a3fbe9a3522b137ffe0 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -303,9 +303,9 @@ Handle<Context> Bootstrapper::CreateEnvironment( |
v8::ExtensionConfiguration* extensions) { |
HandleScope scope(isolate_); |
Genesis genesis(isolate_, global_object, global_template, extensions); |
- Handle<Object> context(isolate_->global_handles()->Create(*genesis.result())); |
- Handle<Context> env = Handle<Context>::cast(context); |
- if (!env.is_null()) { |
+ 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; |
} |