Commit fa3e37e5 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[api] remove deprecated snapshot APIs

R=verwaest@chromium.org

Fixed: v8:7463
Change-Id: I3d0127865ad0430d38124c3ad8ed3bc63ba4e6d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2149421
Auto-Submit: Yang Guo <yangguo@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67169}
parent 8d368f09
...@@ -6449,11 +6449,6 @@ class V8_EXPORT FunctionTemplate : public Template { ...@@ -6449,11 +6449,6 @@ class V8_EXPORT FunctionTemplate : public Template {
SideEffectType side_effect_type = SideEffectType::kHasSideEffect, SideEffectType side_effect_type = SideEffectType::kHasSideEffect,
const CFunction* c_function = nullptr); const CFunction* c_function = nullptr);
/** Get a template included in the snapshot by index. */
V8_DEPRECATED("Use v8::Isolate::GetDataFromSnapshotOnce instead")
static MaybeLocal<FunctionTemplate> FromSnapshot(Isolate* isolate,
size_t index);
/** /**
* Creates a function template backed/cached by a private property. * Creates a function template backed/cached by a private property.
*/ */
...@@ -6743,11 +6738,6 @@ class V8_EXPORT ObjectTemplate : public Template { ...@@ -6743,11 +6738,6 @@ class V8_EXPORT ObjectTemplate : public Template {
Isolate* isolate, Isolate* isolate,
Local<FunctionTemplate> constructor = Local<FunctionTemplate>()); Local<FunctionTemplate> constructor = Local<FunctionTemplate>());
/** Get a template included in the snapshot by index. */
V8_DEPRECATED("Use v8::Isolate::GetDataFromSnapshotOnce instead")
static MaybeLocal<ObjectTemplate> FromSnapshot(Isolate* isolate,
size_t index);
/** Creates a new instance of this template.*/ /** Creates a new instance of this template.*/
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context); V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context);
...@@ -9899,13 +9889,6 @@ class V8_EXPORT SnapshotCreator { ...@@ -9899,13 +9889,6 @@ class V8_EXPORT SnapshotCreator {
SerializeInternalFieldsCallback callback = SerializeInternalFieldsCallback callback =
SerializeInternalFieldsCallback()); SerializeInternalFieldsCallback());
/**
* Add a template to be included in the snapshot blob.
* \returns the index of the template in the snapshot blob.
*/
V8_DEPRECATED("use AddData instead")
size_t AddTemplate(Local<Template> template_obj);
/** /**
* Attach arbitrary V8::Data to the context snapshot, which can be retrieved * Attach arbitrary V8::Data to the context snapshot, which can be retrieved
* via Context::GetDataFromSnapshot after deserialization. This data does not * via Context::GetDataFromSnapshot after deserialization. This data does not
......
...@@ -659,10 +659,6 @@ size_t SnapshotCreator::AddContext(Local<Context> context, ...@@ -659,10 +659,6 @@ size_t SnapshotCreator::AddContext(Local<Context> context,
return index; return index;
} }
size_t SnapshotCreator::AddTemplate(Local<Template> template_obj) {
return AddData(template_obj);
}
size_t SnapshotCreator::AddData(i::Address object) { size_t SnapshotCreator::AddData(i::Address object) {
DCHECK_NE(object, i::kNullAddress); DCHECK_NE(object, i::kNullAddress);
SnapshotCreatorData* data = SnapshotCreatorData::cast(data_); SnapshotCreatorData* data = SnapshotCreatorData::cast(data_);
...@@ -1523,21 +1519,6 @@ Local<FunctionTemplate> FunctionTemplate::New( ...@@ -1523,21 +1519,6 @@ Local<FunctionTemplate> FunctionTemplate::New(
return templ; return templ;
} }
MaybeLocal<FunctionTemplate> FunctionTemplate::FromSnapshot(Isolate* isolate,
size_t index) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
i::FixedArray serialized_objects = i_isolate->heap()->serialized_objects();
int int_index = static_cast<int>(index);
if (int_index < serialized_objects.length()) {
i::Object info = serialized_objects.get(int_index);
if (info.IsFunctionTemplateInfo()) {
return Utils::ToLocal(i::Handle<i::FunctionTemplateInfo>(
i::FunctionTemplateInfo::cast(info), i_isolate));
}
}
return Local<FunctionTemplate>();
}
Local<FunctionTemplate> FunctionTemplate::NewWithCache( Local<FunctionTemplate> FunctionTemplate::NewWithCache(
Isolate* isolate, FunctionCallback callback, Local<Private> cache_property, Isolate* isolate, FunctionCallback callback, Local<Private> cache_property,
Local<Value> data, Local<Signature> signature, int length, Local<Value> data, Local<Signature> signature, int length,
...@@ -1731,21 +1712,6 @@ Local<ObjectTemplate> ObjectTemplate::New( ...@@ -1731,21 +1712,6 @@ Local<ObjectTemplate> ObjectTemplate::New(
return ObjectTemplateNew(isolate, constructor, false); return ObjectTemplateNew(isolate, constructor, false);
} }
MaybeLocal<ObjectTemplate> ObjectTemplate::FromSnapshot(Isolate* isolate,
size_t index) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
i::FixedArray serialized_objects = i_isolate->heap()->serialized_objects();
int int_index = static_cast<int>(index);
if (int_index < serialized_objects.length()) {
i::Object info = serialized_objects.get(int_index);
if (info.IsObjectTemplateInfo()) {
return Utils::ToLocal(i::Handle<i::ObjectTemplateInfo>(
i::ObjectTemplateInfo::cast(info), i_isolate));
}
}
return Local<ObjectTemplate>();
}
// Ensure that the object template has a constructor. If no // Ensure that the object template has a constructor. If no
// constructor is available we create one. // constructor is available we create one.
static i::Handle<i::FunctionTemplateInfo> EnsureConstructor( static i::Handle<i::FunctionTemplateInfo> EnsureConstructor(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment