Merge branch 'js-fix-626'
* js-fix-626: Added check to prevent crash on illegal constructor call
This commit is contained in:
commit
30216c4fb8
1 changed files with 4 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ static SwigV8ReturnValue $jswrapper(const SwigV8Arguments &args) {
|
|||
|
||||
SWIGV8_OBJECT self = args.Holder();
|
||||
$jslocals
|
||||
if(self->InternalFieldCount() < 1) SWIG_exception_fail(SWIG_ERROR, "Illegal call of constructor $jswrapper.");
|
||||
if(args.Length() != $jsargcount) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for $jswrapper.");
|
||||
$jscode
|
||||
|
||||
|
|
@ -80,6 +81,7 @@ static SwigV8ReturnValue $jswrapper(const SwigV8Arguments &args, V8ErrorHandler
|
|||
|
||||
SWIGV8_OBJECT self = args.Holder();
|
||||
$jslocals
|
||||
if(self->InternalFieldCount() < 1) SWIG_exception_fail(SWIG_ERROR, "Illegal call of constructor $jswrapper.");
|
||||
if(args.Length() != $jsargcount) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for $jswrapper.");
|
||||
$jscode
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue