Index: third_party/WebKit/Source/bindings/core/v8/V8SnapshotCreator.h |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8SnapshotCreator.h b/third_party/WebKit/Source/bindings/core/v8/V8SnapshotCreator.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fe5d685024d55d68127296af96cb7ffdaf3c29bf |
--- /dev/null |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8SnapshotCreator.h |
@@ -0,0 +1,38 @@ |
+// Copyright 2017 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 V8SnapshotCreator_h |
+#define V8SnapshotCreator_h |
+ |
+#include <cstdint> |
+ |
+#include "core/CoreExport.h" |
+#include "platform/bindings/V8Binding.h" |
+#include "v8/include/v8.h" |
+ |
+namespace blink { |
+ |
+class CORE_EXPORT V8SnapshotCreator { |
Yuki
2017/05/12 15:20:10
The class header comment is welcome.
Function comm
peria
2017/06/20 10:20:14
Done.
|
+ public: |
+ enum FieldType { |
Yuki
2017/05/15 09:37:29
Let's add
enum class FieldType : unsigned char
Yuki
2017/05/15 09:39:35
s/FieldType/InternalFieldType/?
"FieldType" would
peria
2017/05/30 08:25:42
Done.
peria
2017/05/30 08:25:42
Done.
|
+ kNone, |
+ kNodeType, |
+ kDocumentType, |
+ kHTMLDocumentType, |
+ kHTMLDocumentObject, |
+ }; |
+ |
+ static void TakeSnapshot(v8::SnapshotCreator*, int worldId); |
Yuki
2017/05/15 09:37:29
Do we need to expose (all of) these APIs to public
peria
2017/05/30 08:25:42
move some methods to private:
|
+ static v8::StartupData SetUpSnapshotCreator(v8::SnapshotCreator*); |
+ static v8::SnapshotCreator* GetSnapshotCreator(); |
+ static v8::StartupData Serialize(v8::Local<v8::Object>, int index, void*); |
+ |
+ // In creating V8 context snapshot or not |
+ static bool TakingSnapshot(); |
+ static void SetTakingSnapshot(bool); |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // V8SnapshotCreator_h |