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

Unified Diff: gin/public/isolate_holder.h

Issue 1019483002: Add support to extension_shell and ash_shell to use external V8 snapshot files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 5 years, 9 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') | no next file » | 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..cce92b2b29623e935f51a481348d15d4d871adeb 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -6,6 +6,7 @@
#define GIN_PUBLIC_ISOLATE_HOLDER_H_
#include "base/basictypes.h"
+#include "base/files/file.h"
#include "base/memory/scoped_ptr.h"
#include "gin/gin_export.h"
#include "v8/include/v8.h"
@@ -56,13 +57,26 @@ class GIN_EXPORT IsolateHolder {
static const char kNativesFileName[];
static const char kSnapshotFileName[];
+ // Load the V8 snapshot data from the given file descriptors. If offset and
+ // size are zero it will load the whole file, otherwise it will map and load
+ // the region of the file specified by offset and size. Returns true on
+ // success.
James Cook 2015/03/19 15:48:37 Thanks for documenting the other methods!
static bool LoadV8SnapshotFd(int natives_fd,
int64 natives_offset,
int64 natives_size,
int snapshot_fd,
int64 snapshot_offset,
int64 snapshot_size);
+
+ // Load the V8 snapshot data from the snapshot files. Returns true on success.
static bool LoadV8Snapshot();
+
+ // Opens the V8 snapshot data files and returns open file descriptors to these
+ // files in |natives_fd_out| and |snapshot_fd_out|, which can be passed to
+ // child processes.
+ static bool OpenV8FilesForChildProcesses(base::PlatformFile* natives_fd_out,
+ base::PlatformFile* snapshot_fd_out);
+
#endif // V8_USE_EXTERNAL_STARTUP_DATA
static void GetV8ExternalSnapshotData(const char** natives_data_out,
int* natives_size_out,
« no previous file with comments | « gin/isolate_holder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698