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

Unified Diff: include/v8.h

Issue 2066993004: [snapshot] serialize embedder-provided external references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: also serialize next_serial_number Created 4 years, 6 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index bb0784ad0890b7ca5d7abc31d314a0df888fcce6..9a3658d831136004c0b368f05932babb0ff14ae0 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5493,13 +5493,14 @@ class V8_EXPORT Isolate {
*/
struct CreateParams {
CreateParams()
- : entry_hook(NULL),
- code_event_handler(NULL),
- snapshot_blob(NULL),
- counter_lookup_callback(NULL),
- create_histogram_callback(NULL),
- add_histogram_sample_callback(NULL),
- array_buffer_allocator(NULL) {}
+ : entry_hook(nullptr),
+ code_event_handler(nullptr),
+ snapshot_blob(nullptr),
+ counter_lookup_callback(nullptr),
+ create_histogram_callback(nullptr),
+ add_histogram_sample_callback(nullptr),
+ array_buffer_allocator(nullptr),
+ external_references(nullptr) {}
/**
* The optional entry_hook allows the host application to provide the
@@ -5547,6 +5548,14 @@ class V8_EXPORT Isolate {
* store of ArrayBuffers.
*/
ArrayBuffer::Allocator* array_buffer_allocator;
+
+ /**
+ * Specifies an optional null-terminated array of raw addresses in the
jochen (gone - plz use gerrit) 2016/06/20 13:11:12 nullptr
+ * embedder that V8 can match against during serialization and use for
+ * deserialization. This array and its content must stay valid for the
+ * entire lifetime of the isolate.
+ */
+ intptr_t* external_references;
};
@@ -6775,8 +6784,12 @@ class SnapshotCreator {
* Create and enter an isolate, and set it up for serialization.
* The isolate is either created from scratch or from an existing snapshot.
* The caller keeps ownership of the argument snapshot.
+ * \param existing_blob existing snapshot from which to create this one.
+ * \param external_references a null-terminated array of external references
+ * that must be equivalent to CreateParams::external_references.
*/
- explicit SnapshotCreator(StartupData* existing_blob = nullptr);
+ SnapshotCreator(intptr_t* external_references = nullptr,
jochen (gone - plz use gerrit) 2016/06/20 13:11:12 maybe make that the second parameter, so it's back
+ StartupData* existing_blob = nullptr);
~SnapshotCreator();
@@ -6793,6 +6806,7 @@ class SnapshotCreator {
/**
* Created a snapshot data blob.
+ * This must not be called from within a handle scope.
* \param function_code_handling whether to include compiled function code
* in the snapshot.
* \returns { nullptr, 0 } on failure, and a startup snapshot on success. The
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698