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

Unified Diff: gin/public/isolate_holder.h

Issue 1011133006: Move V8 snapshot loading code from isolate_holder to gin/v8_startup_data.{h,cc}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing #ifdef in V8Initializer::Initialize. Created 5 years, 8 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 7968b1df0ba3edd8a9978105b927a494ec4cb5ef..d2275ed5f6e62858d0d3c0ffdfa0f8edda11c7a9 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -31,9 +31,10 @@ class GIN_EXPORT IsolateHolder {
~IsolateHolder();
// Should be invoked once before creating IsolateHolder instances to
- // 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.
+ // initialize V8 and Gin. In case V8_USE_EXTERNAL_STARTUP_DATA is
+ // defined, V8's initial snapshot should be loaded (by calling
+ // V8Initializer::LoadV8SnapshotFromFD or
+ // V8Initializer::LoadV8Snapshot) before calling this method.
static void Initialize(ScriptMode mode,
v8::ArrayBuffer::Allocator* allocator);
@@ -52,22 +53,13 @@ class GIN_EXPORT IsolateHolder {
void RemoveRunMicrotasksObserver();
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
- static const int kV8SnapshotBasePathKey;
- static const char kNativesFileName[];
- static const char kSnapshotFileName[];
-
- static bool LoadV8SnapshotFd(int natives_fd,
- int64 natives_offset,
- int64 natives_size,
- int snapshot_fd,
- int64 snapshot_offset,
- int64 snapshot_size);
+
+ // Deprecated and to be removed: Use gin::V8Initializer::LoadV8Snapshot()
+ // Load V8 snapshot from default resources. Returns true on success or
+ // snapshot is already loaded, false otherwise.
static bool LoadV8Snapshot();
+
#endif // V8_USE_EXTERNAL_STARTUP_DATA
- static void GetV8ExternalSnapshotData(const char** natives_data_out,
- int* natives_size_out,
- const char** snapshot_data_out,
- int* snapshot_size_out);
private:
v8::Isolate* isolate_;
« 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