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

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: Turn static variables into pointers and remove v8 init in net Created 6 years, 3 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
Index: gin/public/isolate_holder.h
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index da65facff63d6fe5d20b5c4c43fc9f7239bb08b6..f045226d2995277f2d6a7ef475628d427ea3bc8a 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -6,6 +6,9 @@
#define GIN_PUBLIC_ISOLATE_HOLDER_H_
#include "base/basictypes.h"
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+#include "base/files/memory_mapped_file.h"
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
#include "base/memory/scoped_ptr.h"
#include "gin/gin_export.h"
#include "v8/include/v8.h"
@@ -36,10 +39,22 @@ class GIN_EXPORT IsolateHolder {
v8::Isolate* isolate() { return isolate_; }
+#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_;
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+ static base::MemoryMappedFile* mapped_natives;
+ static base::MemoryMappedFile* mapped_snapshot;
rmcilroy 2014/09/23 14:05:40 As mentioned, remove these from this class and mak
baixo 2014/09/23 19:30:30 Done.
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
+
DISALLOW_COPY_AND_ASSIGN(IsolateHolder);
};

Powered by Google App Engine
This is Rietveld 408576698