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

Unified Diff: gin/public/isolate_holder.h

Issue 594603003: Infrastructure for reading V8's initial snapshot from external files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 6 years, 2 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 | « gin/isolate_holder.cc ('k') | gin/shell/gin_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/public/isolate_holder.h
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 29cc2083334b356d9caff02a5b75abc9bc562b49..4e14ade3fd45cab820fb7ddc464a99dd78b5a56b 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -31,7 +31,9 @@ class GIN_EXPORT IsolateHolder {
~IsolateHolder();
// Should be invoked once before creating IsolateHolder instances to
- // initialize V8 and Gin.
+ // initialize V8 and Gin. In case V8_USE_EXTERNAL_STARTUP_DATA is defined,
+ // V8's initial snapshot should be loaded (by calling LoadV8Snapshot or
+ // LoadV8SnapshotFD) before calling Initialize.
static void Initialize(ScriptMode mode,
v8::ArrayBuffer::Allocator* allocator);
@@ -49,6 +51,13 @@ class GIN_EXPORT IsolateHolder {
// thread.
void RemoveRunMicrotasksObserver();
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+#ifdef OS_ANDROID
+ static bool LoadV8SnapshotFD(int natives_fd, int snapshot_fd);
+#endif
+ static bool LoadV8Snapshot();
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
+
private:
v8::Isolate* isolate_;
scoped_ptr<PerIsolateData> isolate_data_;
« no previous file with comments | « gin/isolate_holder.cc ('k') | gin/shell/gin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698