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)) { |