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

Unified Diff: gin/v8_startup_data.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: 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
Index: gin/v8_startup_data.h
diff --git a/gin/v8_startup_data.h b/gin/v8_startup_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..697062f3389881c03d2672964706ef5f698ad8ec
--- /dev/null
+++ b/gin/v8_startup_data.h
@@ -0,0 +1,42 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GIN_V8_STARTUP_DATA_H_
+#define GIN_V8_STARTUP_DATA_H_
+
+#include "base/files/file.h"
+#include "gin/gin_export.h"
+
+namespace gin {
+
+class GIN_EXPORT V8StartupData {
+ public:
+ static const int kV8SnapshotBasePathKey;
+ static const char kNativesFileName[];
+ static const char kSnapshotFileName[];
+
+ static void GetV8ExternalSnapshotData(const char** natives_data_out,
+ int* natives_size_out,
+ const char** snapshot_data_out,
+ int* snapshot_size_out);
+
+#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
+
+ static bool LoadV8SnapshotFromFile(base::PlatformFile natives_fd,
+ int64 natives_offset,
+ int64 natives_size,
+ base::PlatformFile snapshot_fd,
+ int64 snapshot_offset,
+ int64 snapshot_size);
+
+ static bool LoadV8Snapshot();
+
+#endif // V8_USE_EXTERNAL_STARTUP_DATA
+
+ static void Initialize();
+};
+
+} // namespace gin
+
+#endif // GIN_V8_STARTUP_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698