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

Unified Diff: src/snapshot/serialize.cc

Issue 1289603002: Put V8 extras into the snapshot (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment Created 5 years, 4 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
« src/snapshot/serialize.h ('K') | « src/snapshot/serialize.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serialize.cc
diff --git a/src/snapshot/serialize.cc b/src/snapshot/serialize.cc
index 81e071c0fb05809d6b905fe8c5373bbb8e6bc5e6..5b4bf9b4da6a32a03b11df1d3924bb348f8cf0f1 100644
--- a/src/snapshot/serialize.cc
+++ b/src/snapshot/serialize.cc
@@ -577,6 +577,13 @@ void Deserializer::Deserialize(Isolate* isolate) {
}
}
+ for (int i = 0; i < ExtraNatives::GetBuiltinsCount(); i++) {
+ Object* source = isolate_->heap()->extra_natives_source_cache()->get(i);
Yang 2015/08/13 12:28:24 now that we have this code three times, can we tem
+ if (!source->IsUndefined()) {
+ ExternalOneByteString::cast(source)->update_data_cache();
+ }
+ }
+
for (int i = 0; i < CodeStubNatives::GetBuiltinsCount(); i++) {
Object* source = isolate_->heap()->code_stub_natives_source_cache()->get(i);
if (!source->IsUndefined()) {
@@ -1181,6 +1188,11 @@ bool Deserializer::ReadData(Object** current, Object** limit, int source_space,
current);
break;
+ case kExtraNativesStringResource:
+ current = CopyInNativesSource(
+ ExtraNatives::GetScriptSource(source_.Get()), current);
+ break;
+
case kCodeStubNativesStringResource:
current = CopyInNativesSource(
CodeStubNatives::GetScriptSource(source_.Get()), current);
@@ -2192,6 +2204,12 @@ void Serializer::ObjectSerializer::VisitExternalOneByteString(
return;
}
if (SerializeExternalNativeSourceString(
+ ExtraNatives::GetBuiltinsCount(), resource_pointer,
+ serializer_->isolate()->heap()->extra_natives_source_cache(),
Yang 2015/08/13 12:28:24 We can then also replace the third argument with E
+ kExtraNativesStringResource)) {
+ return;
+ }
+ if (SerializeExternalNativeSourceString(
CodeStubNatives::GetBuiltinsCount(), resource_pointer,
serializer_->isolate()->heap()->code_stub_natives_source_cache(),
kCodeStubNativesStringResource)) {
« src/snapshot/serialize.h ('K') | « src/snapshot/serialize.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698