Skip to content

Commit cd80a2a

Browse files
author
Mihail Slavchev
committed
add parameter check
1 parent 8024e44 commit cd80a2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

runtime/src/main/jni/MetadataNode.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,10 @@ void MetadataNode::InterfaceConstructorCallback(const v8::FunctionCallbackInfo<v
986986

987987
if (info.Length() == 1)
988988
{
989+
if (!info[0]->IsObject())
990+
{
991+
throw NativeScriptException(string("First argument must be implementation object"));
992+
}
989993
implementationObject = info[0]->ToObject();
990994
}
991995
else if (info.Length() == 2)

0 commit comments

Comments
 (0)