Skip to content

Commit ac459b3

Browse files
addaleaxtargos
authored andcommitted
deps: V8: cherry-pick fa3e37e511ee
Original commit message: [api] remove deprecated snapshot APIs [email protected] Fixed: v8:7463 Change-Id: I3d0127865ad0430d38124c3ad8ed3bc63ba4e6d3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2149421 Auto-Submit: Yang Guo <[email protected]> Commit-Queue: Toon Verwaest <[email protected]> Reviewed-by: Toon Verwaest <[email protected]> Cr-Commit-Position: refs/heads/master@{#67169} Refs: v8/v8@fa3e37e Backport-PR-URL: #33376 PR-URL: #32885 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
1 parent 2bc79f5 commit ac459b3

File tree

3 files changed

+1
-52
lines changed

3 files changed

+1
-52
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.14',
39+
'v8_embedder_string': '-node.15',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/include/v8.h

-17
Original file line numberDiff line numberDiff line change
@@ -6451,11 +6451,6 @@ class V8_EXPORT FunctionTemplate : public Template {
64516451
SideEffectType side_effect_type = SideEffectType::kHasSideEffect,
64526452
const CFunction* c_function = nullptr);
64536453

6454-
/** Get a template included in the snapshot by index. */
6455-
V8_DEPRECATED("Use v8::Isolate::GetDataFromSnapshotOnce instead")
6456-
static MaybeLocal<FunctionTemplate> FromSnapshot(Isolate* isolate,
6457-
size_t index);
6458-
64596454
/**
64606455
* Creates a function template backed/cached by a private property.
64616456
*/
@@ -6745,11 +6740,6 @@ class V8_EXPORT ObjectTemplate : public Template {
67456740
Isolate* isolate,
67466741
Local<FunctionTemplate> constructor = Local<FunctionTemplate>());
67476742

6748-
/** Get a template included in the snapshot by index. */
6749-
V8_DEPRECATED("Use v8::Isolate::GetDataFromSnapshotOnce instead")
6750-
static MaybeLocal<ObjectTemplate> FromSnapshot(Isolate* isolate,
6751-
size_t index);
6752-
67536743
/** Creates a new instance of this template.*/
67546744
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context);
67556745

@@ -9862,13 +9852,6 @@ class V8_EXPORT SnapshotCreator {
98629852
SerializeInternalFieldsCallback callback =
98639853
SerializeInternalFieldsCallback());
98649854

9865-
/**
9866-
* Add a template to be included in the snapshot blob.
9867-
* \returns the index of the template in the snapshot blob.
9868-
*/
9869-
V8_DEPRECATED("use AddData instead")
9870-
size_t AddTemplate(Local<Template> template_obj);
9871-
98729855
/**
98739856
* Attach arbitrary V8::Data to the context snapshot, which can be retrieved
98749857
* via Context::GetDataFromSnapshot after deserialization. This data does not

deps/v8/src/api/api.cc

-34
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,6 @@ size_t SnapshotCreator::AddContext(Local<Context> context,
659659
return index;
660660
}
661661

662-
size_t SnapshotCreator::AddTemplate(Local<Template> template_obj) {
663-
return AddData(template_obj);
664-
}
665-
666662
size_t SnapshotCreator::AddData(i::Address object) {
667663
DCHECK_NE(object, i::kNullAddress);
668664
SnapshotCreatorData* data = SnapshotCreatorData::cast(data_);
@@ -1523,21 +1519,6 @@ Local<FunctionTemplate> FunctionTemplate::New(
15231519
return templ;
15241520
}
15251521

1526-
MaybeLocal<FunctionTemplate> FunctionTemplate::FromSnapshot(Isolate* isolate,
1527-
size_t index) {
1528-
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1529-
i::FixedArray serialized_objects = i_isolate->heap()->serialized_objects();
1530-
int int_index = static_cast<int>(index);
1531-
if (int_index < serialized_objects.length()) {
1532-
i::Object info = serialized_objects.get(int_index);
1533-
if (info.IsFunctionTemplateInfo()) {
1534-
return Utils::ToLocal(i::Handle<i::FunctionTemplateInfo>(
1535-
i::FunctionTemplateInfo::cast(info), i_isolate));
1536-
}
1537-
}
1538-
return Local<FunctionTemplate>();
1539-
}
1540-
15411522
Local<FunctionTemplate> FunctionTemplate::NewWithCache(
15421523
Isolate* isolate, FunctionCallback callback, Local<Private> cache_property,
15431524
Local<Value> data, Local<Signature> signature, int length,
@@ -1730,21 +1711,6 @@ Local<ObjectTemplate> ObjectTemplate::New(
17301711
return ObjectTemplateNew(isolate, constructor, false);
17311712
}
17321713

1733-
MaybeLocal<ObjectTemplate> ObjectTemplate::FromSnapshot(Isolate* isolate,
1734-
size_t index) {
1735-
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1736-
i::FixedArray serialized_objects = i_isolate->heap()->serialized_objects();
1737-
int int_index = static_cast<int>(index);
1738-
if (int_index < serialized_objects.length()) {
1739-
i::Object info = serialized_objects.get(int_index);
1740-
if (info.IsObjectTemplateInfo()) {
1741-
return Utils::ToLocal(i::Handle<i::ObjectTemplateInfo>(
1742-
i::ObjectTemplateInfo::cast(info), i_isolate));
1743-
}
1744-
}
1745-
return Local<ObjectTemplate>();
1746-
}
1747-
17481714
// Ensure that the object template has a constructor. If no
17491715
// constructor is available we create one.
17501716
static i::Handle<i::FunctionTemplateInfo> EnsureConstructor(

0 commit comments

Comments
 (0)