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

Unified Diff: src/bootstrapper.cc

Issue 2055203002: [snapshot] support multiple contexts in the same snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sinkmember
Patch Set: fix test. again. Created 4 years, 6 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/bootstrapper.h ('k') | src/debug/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 74bc80ca0534254b47bcaecdebf96bd86c022645..aad0c6046451e8726db99b4675e56e00cd72349d 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -138,7 +138,7 @@ class Genesis BASE_EMBEDDED {
public:
Genesis(Isolate* isolate, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template,
- v8::ExtensionConfiguration* extensions,
+ v8::ExtensionConfiguration* extensions, size_t context_snapshot_index,
GlobalContextType context_type);
~Genesis() { }
@@ -324,10 +324,11 @@ void Bootstrapper::Iterate(ObjectVisitor* v) {
Handle<Context> Bootstrapper::CreateEnvironment(
MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template,
- v8::ExtensionConfiguration* extensions, GlobalContextType context_type) {
+ v8::ExtensionConfiguration* extensions, size_t context_snapshot_index,
+ GlobalContextType context_type) {
HandleScope scope(isolate_);
Genesis genesis(isolate_, maybe_global_proxy, global_proxy_template,
- extensions, context_type);
+ extensions, context_snapshot_index, context_type);
Handle<Context> env = genesis.result();
if (env.is_null() ||
(context_type != THIN_CONTEXT && !InstallExtensions(env, extensions))) {
@@ -3796,7 +3797,7 @@ Genesis::Genesis(Isolate* isolate,
MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template,
v8::ExtensionConfiguration* extensions,
- GlobalContextType context_type)
+ size_t context_snapshot_index, GlobalContextType context_type)
: isolate_(isolate), active_(isolate->bootstrapper()) {
NoTrackDoubleFieldsForSerializerScope disable_scope(isolate);
result_ = Handle<Context>::null();
@@ -3825,7 +3826,8 @@ Genesis::Genesis(Isolate* isolate,
// a snapshot. Otherwise we have to build the context from scratch.
// Also create a context from scratch to expose natives, if required by flag.
if (!isolate->initialized_from_snapshot() ||
- !Snapshot::NewContextFromSnapshot(isolate, global_proxy)
+ !Snapshot::NewContextFromSnapshot(isolate, global_proxy,
+ context_snapshot_index)
.ToHandle(&native_context_)) {
native_context_ = Handle<Context>();
}
« no previous file with comments | « src/bootstrapper.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698