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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8SnapshotCreator.h

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Fix some behaviors Created 3 years, 7 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: 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

Powered by Google App Engine
This is Rietveld 408576698