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

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: Address Ross' comments 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
Index: gin/public/isolate_holder.h
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 29cc2083334b356d9caff02a5b75abc9bc562b49..1a091568dc675d4caab52ccef717196cfb0d0254 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -10,6 +10,10 @@
#include "gin/gin_export.h"
#include "v8/include/v8.h"
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+#include "base/files/memory_mapped_file.h"
rmcilroy 2014/10/07 16:16:11 Do you need this include in the header?
baixo 2014/10/08 11:28:55 No. But I need base/files/file_path.h :).
+#endif
+
namespace gin {
class PerIsolateData;
@@ -49,11 +53,26 @@ 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_;
scoped_ptr<RunMicrotasksObserver> task_observer_;
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+
+ static bool MapV8Files(
+ base::FilePath* natives_path, base::FilePath* snapshot_path,
+ int natives = -1, int snapshot = -1);
+
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
+
DISALLOW_COPY_AND_ASSIGN(IsolateHolder);
};

Powered by Google App Engine
This is Rietveld 408576698