Skip to content

Commit 7191491

Browse files
committed
deps: make V8 14.2 ABI-compatible with 14.1
- Reintroduce `v8::Object::SetPrototype` Refs: v8/v8@156d4e7
1 parent cef7fc7 commit 7191491

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

deps/v8/include/v8-object.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,18 @@ class V8_EXPORT Object : public Value {
456456
*/
457457
Local<Value> GetPrototypeV2();
458458

459+
/**
460+
* Set the prototype object. This does not skip objects marked to
461+
* be skipped by __proto__ and it does not consult the security
462+
* handler.
463+
*/
464+
V8_DEPRECATED(
465+
"V8 will stop providing access to hidden prototype (i.e. "
466+
"JSGlobalObject). Use SetPrototypeV2() instead. "
467+
"See http://crbug.com/333672197.")
468+
V8_WARN_UNUSED_RESULT Maybe<bool> SetPrototype(Local<Context> context,
469+
Local<Value> prototype);
470+
459471
/**
460472
* Set the prototype object (same as calling Object.setPrototypeOf(..)).
461473
* This does not consult the security handler.

deps/v8/src/api/api.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4706,6 +4706,12 @@ Maybe<bool> SetPrototypeImpl(v8::Object* this_, Local<Context> context,
47064706

47074707
} // namespace
47084708

4709+
Maybe<bool> v8::Object::SetPrototype(Local<Context> context,
4710+
Local<Value> value) {
4711+
static constexpr bool from_javascript = false;
4712+
return SetPrototypeImpl(this, context, value, from_javascript);
4713+
}
4714+
47094715
Maybe<bool> v8::Object::SetPrototypeV2(Local<Context> context,
47104716
Local<Value> value) {
47114717
static constexpr bool from_javascript = true;

0 commit comments

Comments
 (0)