OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 V8SnapshotCreator_h | |
6 #define V8SnapshotCreator_h | |
7 | |
8 #include "core/CoreExport.h" | |
9 #include "platform/bindings/V8Binding.h" | |
10 #include "v8/include/v8.h" | |
11 | |
12 namespace blink { | |
13 | |
14 class Document; | |
15 | |
16 class CORE_EXPORT V8SnapshotCreator { | |
17 STATIC_ONLY(V8SnapshotCreator); | |
18 | |
19 public: | |
20 // Methods to take a snapshot of V8 context for Blink. | |
21 static v8::StartupData TakeSnapshot(); | |
22 static v8::StartupData SerializeInternalField(v8::Local<v8::Object> holder, | |
Yuki
2017/05/30 14:35:57
Can this be private:?
peria
2017/06/01 08:33:33
Done.
| |
23 int index, | |
24 void* data); | |
25 | |
26 static v8::Local<v8::Context> CreateContext( | |
27 v8::Isolate*, | |
28 const DOMWrapperWorld&, | |
29 v8::ExtensionConfiguration*, | |
30 v8::Local<v8::Object> global_proxy, | |
31 Document*); | |
32 | |
33 static void EnsureInterfaceTemplates(v8::Isolate*, const DOMWrapperWorld&); | |
34 static v8::Local<v8::FunctionTemplate> CreateInterfaceTemplate( | |
35 v8::Isolate*, | |
36 const DOMWrapperWorld&, | |
37 WrapperTypeInfo*); | |
38 | |
39 // Install runtime enabled features which are not installed in snapshot. | |
40 static void InstallRuntimeEnabledFeaturesOnDocument( | |
41 ScriptState*, | |
42 v8::Local<v8::Object> htmldocument_wrapper); | |
43 static void InstallRuntimeEnabledFeaturesOnGlobal( | |
44 ScriptState*, | |
45 v8::Local<v8::Object> global); | |
46 | |
47 static void SetReferenceTable(intptr_t* table); | |
48 static intptr_t* GetReferenceTable(); | |
49 | |
50 private: | |
51 static void DeserializeInternalField(v8::Local<v8::Object> holder, | |
52 int index, | |
53 v8::StartupData payload, | |
54 void* data); | |
55 static void TakeSnapshotForWorld(v8::SnapshotCreator*, | |
56 const DOMWrapperWorld&); | |
57 }; | |
58 | |
59 } // namespace blink | |
60 | |
61 #endif // V8SnapshotCreator_h | |
OLD | NEW |