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

Unified Diff: src/api.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
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/bootstrapper.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/bootstrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698