mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
deps: revert ABI-breaking change from V8 9.2
Refs:a7980d43e0Refs:ad4eab00e7Fixes: https://github.com/nodejs/node/issues/39623 PR-URL: https://github.com/nodejs/node/pull/39624 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
This commit is contained in:
parent
06d7b8e8c8
commit
3091295609
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
# Reset this number to 0 on major V8 upgrades.
|
# Reset this number to 0 on major V8 upgrades.
|
||||||
# Increment by one for each non-official patch applied to deps/v8.
|
# Increment by one for each non-official patch applied to deps/v8.
|
||||||
'v8_embedder_string': '-node.18',
|
'v8_embedder_string': '-node.19',
|
||||||
|
|
||||||
##### V8 defaults for Node.js #####
|
##### V8 defaults for Node.js #####
|
||||||
|
|
||||||
|
|
|
||||||
11
deps/v8/include/v8.h
vendored
11
deps/v8/include/v8.h
vendored
|
|
@ -6796,6 +6796,17 @@ class V8_EXPORT FunctionTemplate : public Template {
|
||||||
* API call, see the comment above the class declaration.
|
* API call, see the comment above the class declaration.
|
||||||
*/
|
*/
|
||||||
void SetCallHandler(
|
void SetCallHandler(
|
||||||
|
FunctionCallback callback, Local<Value> data = Local<Value>(),
|
||||||
|
SideEffectType side_effect_type = SideEffectType::kHasSideEffect,
|
||||||
|
const CFunction* c_function = nullptr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the call-handler callback for a FunctionTemplate. This
|
||||||
|
* callback is called whenever the function created from this
|
||||||
|
* FunctionTemplate is called. The 'c_function' represents a fast
|
||||||
|
* API call, see the comment above the class declaration.
|
||||||
|
*/
|
||||||
|
void SetCallHandlerV8_92(
|
||||||
FunctionCallback callback, Local<Value> data = Local<Value>(),
|
FunctionCallback callback, Local<Value> data = Local<Value>(),
|
||||||
SideEffectType side_effect_type = SideEffectType::kHasSideEffect,
|
SideEffectType side_effect_type = SideEffectType::kHasSideEffect,
|
||||||
const MemorySpan<const CFunction>& c_function_overloads = {});
|
const MemorySpan<const CFunction>& c_function_overloads = {});
|
||||||
|
|
|
||||||
14
deps/v8/src/api/api.cc
vendored
14
deps/v8/src/api/api.cc
vendored
|
|
@ -1244,8 +1244,8 @@ static Local<FunctionTemplate> FunctionTemplateNew(
|
||||||
if (behavior == ConstructorBehavior::kThrow) raw.set_remove_prototype(true);
|
if (behavior == ConstructorBehavior::kThrow) raw.set_remove_prototype(true);
|
||||||
}
|
}
|
||||||
if (callback != nullptr) {
|
if (callback != nullptr) {
|
||||||
Utils::ToLocal(obj)->SetCallHandler(callback, data, side_effect_type,
|
Utils::ToLocal(obj)->SetCallHandlerV8_92(callback, data, side_effect_type,
|
||||||
c_function_overloads);
|
c_function_overloads);
|
||||||
}
|
}
|
||||||
return Utils::ToLocal(obj);
|
return Utils::ToLocal(obj);
|
||||||
}
|
}
|
||||||
|
|
@ -1308,6 +1308,16 @@ Local<AccessorSignature> AccessorSignature::New(
|
||||||
} while (false)
|
} while (false)
|
||||||
|
|
||||||
void FunctionTemplate::SetCallHandler(
|
void FunctionTemplate::SetCallHandler(
|
||||||
|
FunctionCallback callback, v8::Local<Value> data,
|
||||||
|
SideEffectType side_effect_type,
|
||||||
|
const CFunction* c_function) {
|
||||||
|
SetCallHandlerV8_92(
|
||||||
|
callback, data, side_effect_type,
|
||||||
|
c_function ? MemorySpan<const CFunction>{c_function, 1}
|
||||||
|
: MemorySpan<const CFunction>{});
|
||||||
|
}
|
||||||
|
|
||||||
|
void FunctionTemplate::SetCallHandlerV8_92(
|
||||||
FunctionCallback callback, v8::Local<Value> data,
|
FunctionCallback callback, v8::Local<Value> data,
|
||||||
SideEffectType side_effect_type,
|
SideEffectType side_effect_type,
|
||||||
const MemorySpan<const CFunction>& c_function_overloads) {
|
const MemorySpan<const CFunction>& c_function_overloads) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user