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

Unified Diff: src/bootstrapper.cc

Issue 2619203002: [serializer] pass internal fields deserializer callback as argument. (Closed)
Patch Set: 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 | « 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 67b759a12e522a9c40406c9f5c0c64d7a83b9e72..12adfe0e3479a4239b1627e6415f987dc46b48a4 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -140,7 +140,9 @@ class Genesis BASE_EMBEDDED {
public:
Genesis(Isolate* isolate, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template,
- size_t context_snapshot_index, GlobalContextType context_type);
+ size_t context_snapshot_index,
+ v8::DeserializeInternalFieldsCallback internal_fields_deserializer,
+ GlobalContextType context_type);
Genesis(Isolate* isolate, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template);
~Genesis() { }
@@ -309,10 +311,12 @@ Handle<Context> Bootstrapper::CreateEnvironment(
MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_proxy_template,
v8::ExtensionConfiguration* extensions, size_t context_snapshot_index,
+ v8::DeserializeInternalFieldsCallback internal_fields_deserializer,
GlobalContextType context_type) {
HandleScope scope(isolate_);
Genesis genesis(isolate_, maybe_global_proxy, global_proxy_template,
- context_snapshot_index, context_type);
+ context_snapshot_index, internal_fields_deserializer,
+ context_type);
Handle<Context> env = genesis.result();
if (env.is_null() || !InstallExtensions(env, extensions)) {
return Handle<Context>();
@@ -4512,10 +4516,12 @@ class NoTrackDoubleFieldsForSerializerScope {
bool enabled_;
};
-Genesis::Genesis(Isolate* isolate,
- MaybeHandle<JSGlobalProxy> maybe_global_proxy,
- v8::Local<v8::ObjectTemplate> global_proxy_template,
- size_t context_snapshot_index, GlobalContextType context_type)
+Genesis::Genesis(
+ Isolate* isolate, MaybeHandle<JSGlobalProxy> maybe_global_proxy,
+ v8::Local<v8::ObjectTemplate> global_proxy_template,
+ size_t context_snapshot_index,
+ v8::DeserializeInternalFieldsCallback internal_fields_deserializer,
+ GlobalContextType context_type)
: isolate_(isolate), active_(isolate->bootstrapper()) {
NoTrackDoubleFieldsForSerializerScope disable_scope(isolate);
result_ = Handle<Context>::null();
@@ -4562,7 +4568,8 @@ Genesis::Genesis(Isolate* isolate,
// Also create a context from scratch to expose natives, if required by flag.
if (!isolate->initialized_from_snapshot() ||
!Snapshot::NewContextFromSnapshot(isolate, global_proxy,
- context_snapshot_index)
+ context_snapshot_index,
+ internal_fields_deserializer)
.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