Skip to content

Commit c3ecbc7

Browse files
addaleaxBethGriggs
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 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 9568fbc commit c3ecbc7

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
@@ -35,7 +35,7 @@
3535

3636
# Reset this number to 0 on major V8 upgrades.
3737
# Increment by one for each non-official patch applied to deps/v8.
38-
'v8_embedder_string': '-node.17',
38+
'v8_embedder_string': '-node.18',
3939

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

deps/v8/include/v8.h

-17
Original file line numberDiff line numberDiff line change
@@ -6382,11 +6382,6 @@ class V8_EXPORT FunctionTemplate : public Template {
63826382
ConstructorBehavior behavior = ConstructorBehavior::kAllow,
63836383
SideEffectType side_effect_type = SideEffectType::kHasSideEffect);
63846384

6385-
/** Get a template included in the snapshot by index. */
6386-
V8_DEPRECATED("Use v8::Isolate::GetDataFromSnapshotOnce instead")
6387-
static MaybeLocal<FunctionTemplate> FromSnapshot(Isolate* isolate,
6388-
size_t index);
6389-
63906385
/**
63916386
* Creates a function template backed/cached by a private property.
63926387
*/
@@ -6674,11 +6669,6 @@ class V8_EXPORT ObjectTemplate : public Template {
66746669
Isolate* isolate,
66756670
Local<FunctionTemplate> constructor = Local<FunctionTemplate>());
66766671

6677-
/** Get a template included in the snapshot by index. */
6678-
V8_DEPRECATED("Use v8::Isolate::GetDataFromSnapshotOnce instead")
6679-
static MaybeLocal<ObjectTemplate> FromSnapshot(Isolate* isolate,
6680-
size_t index);
6681-
66826672
/** Creates a new instance of this template.*/
66836673
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context);
66846674

@@ -9766,13 +9756,6 @@ class V8_EXPORT SnapshotCreator {
97669756
SerializeInternalFieldsCallback callback =
97679757
SerializeInternalFieldsCallback());
97689758

9769-
/**
9770-
* Add a template to be included in the snapshot blob.
9771-
* \returns the index of the template in the snapshot blob.
9772-
*/
9773-
V8_DEPRECATED("use AddData instead")
9774-
size_t AddTemplate(Local<Template> template_obj);
9775-
97769759
/**
97779760
* Attach arbitrary V8::Data to the context snapshot, which can be retrieved
97789761
* via Context::GetDataFromSnapshot after deserialization. This data does not

deps/v8/src/api/api.cc

-34
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,6 @@ size_t SnapshotCreator::AddContext(Local<Context> context,
631631
return index;
632632
}
633633

634-
size_t SnapshotCreator::AddTemplate(Local<Template> template_obj) {
635-
return AddData(template_obj);
636-
}
637-
638634
size_t SnapshotCreator::AddData(i::Address object) {
639635
DCHECK_NE(object, i::kNullAddress);
640636
SnapshotCreatorData* data = SnapshotCreatorData::cast(data_);
@@ -1490,21 +1486,6 @@ Local<FunctionTemplate> FunctionTemplate::New(
14901486
return templ;
14911487
}
14921488

1493-
MaybeLocal<FunctionTemplate> FunctionTemplate::FromSnapshot(Isolate* isolate,
1494-
size_t index) {
1495-
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1496-
i::FixedArray serialized_objects = i_isolate->heap()->serialized_objects();
1497-
int int_index = static_cast<int>(index);
1498-
if (int_index < serialized_objects.length()) {
1499-
i::Object info = serialized_objects.get(int_index);
1500-
if (info.IsFunctionTemplateInfo()) {
1501-
return Utils::ToLocal(i::Handle<i::FunctionTemplateInfo>(
1502-
i::FunctionTemplateInfo::cast(info), i_isolate));
1503-
}
1504-
}
1505-
return Local<FunctionTemplate>();
1506-
}
1507-
15081489
Local<FunctionTemplate> FunctionTemplate::NewWithCache(
15091490
Isolate* isolate, FunctionCallback callback, Local<Private> cache_property,
15101491
Local<Value> data, Local<Signature> signature, int length,
@@ -1687,21 +1668,6 @@ Local<ObjectTemplate> ObjectTemplate::New(
16871668
return ObjectTemplateNew(isolate, constructor, false);
16881669
}
16891670

1690-
MaybeLocal<ObjectTemplate> ObjectTemplate::FromSnapshot(Isolate* isolate,
1691-
size_t index) {
1692-
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
1693-
i::FixedArray serialized_objects = i_isolate->heap()->serialized_objects();
1694-
int int_index = static_cast<int>(index);
1695-
if (int_index < serialized_objects.length()) {
1696-
i::Object info = serialized_objects.get(int_index);
1697-
if (info.IsObjectTemplateInfo()) {
1698-
return Utils::ToLocal(i::Handle<i::ObjectTemplateInfo>(
1699-
i::ObjectTemplateInfo::cast(info), i_isolate));
1700-
}
1701-
}
1702-
return Local<ObjectTemplate>();
1703-
}
1704-
17051671
// Ensure that the object template has a constructor. If no
17061672
// constructor is available we create one.
17071673
static i::Handle<i::FunctionTemplateInfo> EnsureConstructor(

0 commit comments

Comments
 (0)