summaryrefslogtreecommitdiff
path: root/Lib/javascript/v8/javascripthelpers.swg
diff options
context:
space:
mode:
authorYegor Yefremov <yegorslists@googlemail.com>2020-03-02 14:44:04 +0100
committerYegor Yefremov <yegorslists@googlemail.com>2020-04-07 15:23:31 +0200
commit113d78a083aa897ffdca4ff6bd9b42e630d16d27 (patch)
tree0235f8c98acf0c1f40fa19ea44cbe8579afa2dc5 /Lib/javascript/v8/javascripthelpers.swg
parent26fc996ad6587d50727b8755ae7126e49cadf180 (diff)
downloadswig-113d78a083aa897ffdca4ff6bd9b42e630d16d27.tar.gz
Add support for Node.js v12
Diffstat (limited to 'Lib/javascript/v8/javascripthelpers.swg')
-rw-r--r--Lib/javascript/v8/javascripthelpers.swg5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/javascript/v8/javascripthelpers.swg b/Lib/javascript/v8/javascripthelpers.swg
index 465d3ee48..cbb43b56d 100644
--- a/Lib/javascript/v8/javascripthelpers.swg
+++ b/Lib/javascript/v8/javascripthelpers.swg
@@ -64,6 +64,11 @@ 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)
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
+ obj->Set(SWIGV8_CURRENT_CONTEXT(), SWIGV8_SYMBOL_NEW(symbol), SWIGV8_FUNCTEMPLATE_NEW(_func)->GetFunction(SWIGV8_CURRENT_CONTEXT()).ToLocalChecked());
+#endif
}
/**