Fixes for node v12.0-12.5
This commit is contained in:
parent
7cb719ee67
commit
0e36b5d6fd
3 changed files with 9 additions and 11 deletions
|
|
@ -426,7 +426,7 @@ fail:
|
|||
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903)
|
||||
$jsmangledname_class_0->SetHiddenPrototype(true);
|
||||
v8::Handle<v8::Object> $jsmangledname_obj = $jsmangledname_class_0->GetFunction();
|
||||
#elif (SWIG_V8_VERSION < 0x0705)
|
||||
#elif (SWIG_V8_VERSION < 0x0704)
|
||||
$jsmangledname_class_0->SetHiddenPrototype(true);
|
||||
v8::Local<v8::Object> $jsmangledname_obj = $jsmangledname_class_0->GetFunction();
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -62,10 +62,8 @@ SWIGRUNTIME void SWIGV8_AddMemberVariable(SWIGV8_FUNCTION_TEMPLATE class_templ,
|
|||
*/
|
||||
SWIGRUNTIME void SWIGV8_AddStaticFunction(SWIGV8_OBJECT obj, const char* symbol,
|
||||
const SwigV8FunctionCallback& _func) {
|
||||
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903) || (SWIG_V8_VERSION < 0x0705)
|
||||
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903) || (SWIG_V8_VERSION < 0x0704)
|
||||
obj->Set(SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)->GetFunction());
|
||||
#elif (SWIG_V8_VERSION < 0x0706)
|
||||
obj->Set(SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)->GetFunction(SWIGV8_CURRENT_CONTEXT()).ToLocalChecked());
|
||||
#else
|
||||
SWIGV8_MAYBE_CHECK(obj->Set(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)->GetFunction(SWIGV8_CURRENT_CONTEXT()).ToLocalChecked()));
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031803)
|
||||
#define SWIGV8_STRING_NEW2(cstr, len) v8::String::New(cstr, len)
|
||||
#elif (SWIG_V8_VERSION < 0x0706)
|
||||
#elif (SWIG_V8_VERSION < 0x0704)
|
||||
#define SWIGV8_STRING_NEW2(cstr, len) v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), cstr, v8::String::kNormalString, len)
|
||||
#else
|
||||
#define SWIGV8_STRING_NEW2(cstr, len) (v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), cstr, v8::NewStringType::kNormal, len)).ToLocalChecked()
|
||||
|
|
@ -49,7 +49,7 @@ typedef v8::PropertyCallbackInfo<v8::Value> SwigV8PropertyCallbackInfo;
|
|||
#define SWIGV8_THROW_EXCEPTION(err) v8::ThrowException(err)
|
||||
#define SWIGV8_STRING_NEW(str) v8::String::New(str)
|
||||
#define SWIGV8_SYMBOL_NEW(sym) v8::String::NewSymbol(sym)
|
||||
#elif (SWIG_V8_VERSION < 0x0706)
|
||||
#elif (SWIG_V8_VERSION < 0x0704)
|
||||
#define SWIGV8_ADJUST_MEMORY(size) v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size)
|
||||
#define SWIGV8_CURRENT_CONTEXT() v8::Isolate::GetCurrent()->GetCurrentContext()
|
||||
#define SWIGV8_THROW_EXCEPTION(err) v8::Isolate::GetCurrent()->ThrowException(err)
|
||||
|
|
@ -125,7 +125,7 @@ typedef v8::PropertyCallbackInfo<v8::Value> SwigV8PropertyCallbackInfo;
|
|||
#define SWIGV8_BOOLEAN_VALUE(handle) (handle)->BooleanValue()
|
||||
#define SWIGV8_WRITE_UTF8(handle, buffer, len) (handle)->WriteUtf8(buffer, len)
|
||||
#define SWIGV8_UTF8_LENGTH(handle) (handle)->Utf8Length()
|
||||
#elif (SWIG_V8_VERSION < 0x0706)
|
||||
#elif (SWIG_V8_VERSION < 0x0704)
|
||||
#define SWIGV8_TO_OBJECT(handle) (handle)->ToObject(SWIGV8_CURRENT_CONTEXT()).ToLocalChecked()
|
||||
#define SWIGV8_TO_STRING(handle) (handle)->ToString(SWIGV8_CURRENT_CONTEXT()).ToLocalChecked()
|
||||
#define SWIGV8_NUMBER_VALUE(handle) (handle)->NumberValue(SWIGV8_CURRENT_CONTEXT()).ToChecked()
|
||||
|
|
@ -393,7 +393,7 @@ SWIGRUNTIME void SWIGV8_SetPrivateData(SWIGV8_OBJECT obj, void *ptr, swig_type_i
|
|||
cdata->handle.MarkIndependent();
|
||||
#elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
|
||||
cdata->handle.MarkIndependent(v8::Isolate::GetCurrent());
|
||||
#elif (SWIG_V8_VERSION < 0x0706)
|
||||
#elif (SWIG_V8_VERSION < 0x0704)
|
||||
cdata->handle.MarkIndependent();
|
||||
// Looks like future versions do not require that anymore:
|
||||
// https://monorail-prod.appspot.com/p/chromium/issues/detail?id=923361#c11
|
||||
|
|
@ -445,7 +445,7 @@ SWIGRUNTIME SWIGV8_VALUE SWIG_V8_NewPointerObj(void *ptr, swig_type_info *info,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903) || (SWIG_V8_VERSION < 0x0705)
|
||||
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903) || (SWIG_V8_VERSION < 0x0704)
|
||||
v8::Local<v8::Object> result = class_templ->InstanceTemplate()->NewInstance();
|
||||
#else
|
||||
v8::Local<v8::Object> result = class_templ->InstanceTemplate()->NewInstance(SWIGV8_CURRENT_CONTEXT()).ToLocalChecked();
|
||||
|
|
@ -673,7 +673,7 @@ SWIGV8_VALUE SWIGV8_NewPackedObj(void *data, size_t size, swig_type_info *type)
|
|||
cdata->handle.MarkIndependent();
|
||||
#elif (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x032100)
|
||||
cdata->handle.MarkIndependent(v8::Isolate::GetCurrent());
|
||||
#elif (SWIG_V8_VERSION < 0x0706)
|
||||
#elif (SWIG_V8_VERSION < 0x0704)
|
||||
cdata->handle.MarkIndependent();
|
||||
// Looks like future versions do not require that anymore:
|
||||
// https://monorail-prod.appspot.com/p/chromium/issues/detail?id=923361#c11
|
||||
|
|
@ -701,7 +701,7 @@ SWIGV8_VALUE SWIGV8_AppendOutput(SWIGV8_VALUE result, SWIGV8_VALUE obj) {
|
|||
}
|
||||
SWIGV8_ARRAY arr = SWIGV8_ARRAY::Cast(result);
|
||||
|
||||
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903) || (SWIG_V8_VERSION < 0x0706)
|
||||
#if (V8_MAJOR_VERSION-0) < 4 && (SWIG_V8_VERSION < 0x031903) || (SWIG_V8_VERSION < 0x0704)
|
||||
arr->Set(arr->Length(), obj);
|
||||
#else
|
||||
SWIGV8_MAYBE_CHECK(arr->Set(SWIGV8_CURRENT_CONTEXT(), arr->Length(), obj));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue