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

Unified Diff: src/bootstrapper.cc

Issue 2601503002: Add Object::IsNullOrUndefined(Isolate*) helper method (Closed)
Patch Set: fixing merge conflicts Created 3 years, 11 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 | « include/v8.h ('k') | src/builtins/builtins-array.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 12adfe0e3479a4239b1627e6415f987dc46b48a4..c99cadc481d0718e3bda6ee5b55c836e68392063 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -335,14 +335,15 @@ Handle<JSGlobalProxy> Bootstrapper::NewRemoteContext(
}
void Bootstrapper::DetachGlobal(Handle<Context> env) {
- env->GetIsolate()->counters()->errors_thrown_per_context()->AddSample(
- env->GetErrorsThrown());
+ Isolate* isolate = env->GetIsolate();
+ isolate->counters()->errors_thrown_per_context()->AddSample(
+ env->GetErrorsThrown());
- Factory* factory = env->GetIsolate()->factory();
+ Heap* heap = isolate->heap();
Handle<JSGlobalProxy> global_proxy(JSGlobalProxy::cast(env->global_proxy()));
- global_proxy->set_native_context(*factory->null_value());
- JSObject::ForceSetPrototype(global_proxy, factory->null_value());
- global_proxy->map()->SetConstructor(*factory->null_value());
+ global_proxy->set_native_context(heap->null_value());
+ JSObject::ForceSetPrototype(global_proxy, isolate->factory()->null_value());
+ global_proxy->map()->SetConstructor(heap->null_value());
if (FLAG_track_detached_contexts) {
env->GetIsolate()->AddDetachedContext(env);
}
« no previous file with comments | « include/v8.h ('k') | src/builtins/builtins-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698