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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GIN_V8_STARTUP_DATA_H_
6 #define GIN_V8_STARTUP_DATA_H_
7
8 #include "base/files/file.h"
9 #include "gin/gin_export.h"
10
11 namespace gin {
12
13 class GIN_EXPORT V8StartupData {
14 public:
15 static const int kV8SnapshotBasePathKey;
16 static const char kNativesFileName[];
17 static const char kSnapshotFileName[];
18
19 static void GetV8ExternalSnapshotData(const char** natives_data_out,
20 int* natives_size_out,
21 const char** snapshot_data_out,
22 int* snapshot_size_out);
23
24 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
25
26 static bool LoadV8SnapshotFromFile(base::PlatformFile natives_fd,
27 int64 natives_offset,
28 int64 natives_size,
29 base::PlatformFile snapshot_fd,
30 int64 snapshot_offset,
31 int64 snapshot_size);
32
33 static bool LoadV8Snapshot();
34
35 #endif // V8_USE_EXTERNAL_STARTUP_DATA
36
37 static void Initialize();
38 };
39
40 } // namespace gin
41
42 #endif // GIN_V8_STARTUP_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698