summaryrefslogtreecommitdiff
path: root/deps/v8/include/v8-snapshot.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/include/v8-snapshot.h')
-rw-r--r--deps/v8/include/v8-snapshot.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/deps/v8/include/v8-snapshot.h b/deps/v8/include/v8-snapshot.h
index 2400357cf6..d47bcbaec9 100644
--- a/deps/v8/include/v8-snapshot.h
+++ b/deps/v8/include/v8-snapshot.h
@@ -91,7 +91,7 @@ class V8_EXPORT SnapshotCreator {
*/
SnapshotCreator(Isolate* isolate,
const intptr_t* external_references = nullptr,
- StartupData* existing_blob = nullptr);
+ const StartupData* existing_blob = nullptr);
/**
* Create and enter an isolate, and set it up for serialization.
@@ -102,7 +102,7 @@ class V8_EXPORT SnapshotCreator {
* that must be equivalent to CreateParams::external_references.
*/
SnapshotCreator(const intptr_t* external_references = nullptr,
- StartupData* existing_blob = nullptr);
+ const StartupData* existing_blob = nullptr);
/**
* Destroy the snapshot creator, and exit and dispose of the Isolate
@@ -179,16 +179,12 @@ class V8_EXPORT SnapshotCreator {
template <class T>
size_t SnapshotCreator::AddData(Local<Context> context, Local<T> object) {
- T* object_ptr = *object;
- internal::Address* p = reinterpret_cast<internal::Address*>(object_ptr);
- return AddData(context, *p);
+ return AddData(context, internal::ValueHelper::ValueAsAddress(*object));
}
template <class T>
size_t SnapshotCreator::AddData(Local<T> object) {
- T* object_ptr = *object;
- internal::Address* p = reinterpret_cast<internal::Address*>(object_ptr);
- return AddData(*p);
+ return AddData(internal::ValueHelper::ValueAsAddress(*object));
}
} // namespace v8