diff --git a/common.gypi b/common.gypi index c3a79ae936847c..040d0d1593eb15 100644 --- a/common.gypi +++ b/common.gypi @@ -35,7 +35,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.29', + 'v8_embedder_string': '-node.30', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index ef7bb43efb1171..d09055e15d2fbd 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -6279,6 +6279,7 @@ typedef bool (*AccessCheckCallback)(Local accessing_context, Local accessed_object, Local data); +class CFunction; /** * A FunctionTemplate is used to create functions at runtime. There * can only be one function created from a FunctionTemplate in a @@ -6387,7 +6388,8 @@ class V8_EXPORT FunctionTemplate : public Template { Local data = Local(), Local signature = Local(), int length = 0, ConstructorBehavior behavior = ConstructorBehavior::kAllow, - SideEffectType side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType side_effect_type = SideEffectType::kHasSideEffect, + const CFunction* not_available_in_node_v14_yet = nullptr); /** * Creates a function template backed/cached by a private property. @@ -6418,7 +6420,8 @@ class V8_EXPORT FunctionTemplate : public Template { */ void SetCallHandler( FunctionCallback callback, Local data = Local(), - SideEffectType side_effect_type = SideEffectType::kHasSideEffect); + SideEffectType side_effect_type = SideEffectType::kHasSideEffect, + const CFunction* not_available_in_node_v14_yet = nullptr); /** Set the predefined length property for the FunctionTemplate. */ void SetLength(int length); @@ -8110,7 +8113,10 @@ class V8_EXPORT Isolate { array_buffer_allocator_shared(), external_references(nullptr), allow_atomics_wait(true), - only_terminate_in_safe_scope(false) {} + only_terminate_in_safe_scope(false), + embedder_wrapper_type_index(-1), + embedder_wrapper_object_index(-1) {} + /** * Allows the host application to provide the address of a function that is @@ -8174,6 +8180,10 @@ class V8_EXPORT Isolate { * Termination is postponed when there is no active SafeForTerminationScope. */ bool only_terminate_in_safe_scope; + + // Not available in Node v14 yet. + int embedder_wrapper_type_index; + int embedder_wrapper_object_index; }; diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index 65853fdd94a702..9693e4c843ed18 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -1499,7 +1499,7 @@ static Local FunctionTemplateNew( Local FunctionTemplate::New( Isolate* isolate, FunctionCallback callback, v8::Local data, v8::Local signature, int length, ConstructorBehavior behavior, - SideEffectType side_effect_type) { + SideEffectType side_effect_type, const CFunction*) { i::Isolate* i_isolate = reinterpret_cast(isolate); // Changes to the environment cannot be captured in the snapshot. Expect no // function templates when the isolate is created for serialization. @@ -1540,7 +1540,8 @@ Local AccessorSignature::New( void FunctionTemplate::SetCallHandler(FunctionCallback callback, v8::Local data, - SideEffectType side_effect_type) { + SideEffectType side_effect_type, + const CFunction*) { auto info = Utils::OpenHandle(this); EnsureNotInstantiated(info, "v8::FunctionTemplate::SetCallHandler"); i::Isolate* isolate = info->GetIsolate();