Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 4f98293556bbd8d3eca3a15c2361c135477334f2..03d0e51c74b0f7d553e89c250e7e60190d457f21 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -383,12 +383,18 @@ StartupData V8::CreateSnapshotDataBlob(const char* custom_source) { |
} |
} |
if (!context.IsEmpty()) { |
- // Make sure all builtin scripts are cached. |
{ |
HandleScope scope(isolate); |
+ |
+ // Make sure all builtin scripts are cached. |
for (int i = 0; i < i::Natives::GetBuiltinsCount(); i++) { |
internal_isolate->bootstrapper()->SourceLookup<i::Natives>(i); |
} |
+ |
+ // Make sure all extra scripts are cached. |
+ for (int i = 0; i < i::ExtraNatives::GetBuiltinsCount(); i++) { |
+ internal_isolate->bootstrapper()->SourceLookup<i::ExtraNatives>(i); |
+ } |
Yang
2015/08/13 12:28:24
I don't think any of this is actually necessary. W
|
} |
// If we don't do this then we end up with a stray root pointing at the |
// context even after we have disposed of the context. |