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

Unified Diff: src/bootstrapper.cc

Issue 3788008: [Isolates] Fix auto extraction of isolate from heap objects in handle constructor. (Closed)
Patch Set: Created 10 years, 2 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 | « no previous file | src/debug.h » ('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 12f4e09084d1c54a9f7976715abd2c655ede14bb..68a4ee079cb909c6076f7f08bfb8161d5ff1ee0b 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1399,6 +1399,7 @@ void Genesis::InstallJSFunctionResultCaches() {
global_context()->set_jsfunction_result_caches(*caches);
}
+
void Genesis::InitializeNormalizedMapCaches() {
Handle<FixedArray> array(
FACTORY->NewFixedArray(NormalizedMapCache::kEntries, TENURED));
@@ -1406,12 +1407,12 @@ void Genesis::InitializeNormalizedMapCaches() {
}
-
bool Bootstrapper::InstallExtensions(Handle<Context> global_context,
v8::ExtensionConfiguration* extensions) {
+ Isolate* isolate = Isolate::Current();
BootstrapperActive active;
- SaveContext saved_context;
- Isolate::Current()->set_context(*global_context);
+ SaveContext saved_context(isolate);
+ isolate->set_context(*global_context);
if (!Genesis::InstallExtensions(global_context, extensions)) return false;
Genesis::InstallSpecialObjects(global_context);
return true;
@@ -1749,7 +1750,7 @@ Genesis::Genesis(Handle<Object> global_object,
// Before creating the roots we must save the context and restore it
// on all function exits.
HandleScope scope;
- SaveContext saved_context;
+ SaveContext saved_context(isolate);
Handle<Context> new_context = Snapshot::NewContextFromSnapshot();
if (!new_context.is_null()) {
« no previous file with comments | « no previous file | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698