diff --git a/runtime/src/main/jni/MetadataNode.cpp b/runtime/src/main/jni/MetadataNode.cpp index 0293bc7ac..2dabe30ab 100644 --- a/runtime/src/main/jni/MetadataNode.cpp +++ b/runtime/src/main/jni/MetadataNode.cpp @@ -612,9 +612,8 @@ void MetadataNode::SetInstanceMembersFromRuntimeMetadata(Isolate *isolate, Local auto funcData = External::New(isolate, callbackData); auto funcTemplate = FunctionTemplate::New(isolate, MethodCallback, funcData); - auto func = funcTemplate->GetFunction(); auto funcName = ConvertToV8String(entry.name); - prototypeTemplate->Set(funcName, func); + prototypeTemplate->Set(funcName, funcTemplate); lastMethodName = entry.name; } callbackData->candidates.push_back(entry);