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

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

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: . Created 3 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 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..dc180892259fb7a55076e57181ef8511abb9fd16
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/core/v8/V8SnapshotCreator.h
@@ -0,0 +1,37 @@
+// 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 <v8.h>
+#include <cstdint>
+#include "bindings/core/v8/V8Binding.h"
+#include "core/CoreExport.h"
+
+namespace blink {
+
+class CORE_EXPORT V8SnapshotCreator {
+ public:
+ enum FieldType {
+ kNone,
+ kNodeType,
+ kDocumentType,
+ kHTMLDocumentType,
+ kHTMLDocumentObject,
+ };
+
+ static void TakeSnapshot(v8::SnapshotCreator*, int worldId);
+ 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