Skip to content

Commit b322ff5

Browse files
committed
remove redundant code in MetadataNode.cpp
1 parent b094713 commit b322ff5

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/jni/MetadataNode.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ Local<Function> MetadataNode::SetMembersFromStaticMetadata(Isolate *isolate, Loc
487487
curPtr += sizeof(uint16_t);
488488
string lastMethodName;
489489
MethodCallbackData *callbackData = nullptr;
490-
ConstructorCallbackData *ctorCallbackData = nullptr;
491490

492491
for (auto i = 0; i < instanceMethodCout; i++)
493492
{
@@ -517,19 +516,6 @@ Local<Function> MetadataNode::SetMembersFromStaticMetadata(Isolate *isolate, Loc
517516
lastMethodName = entry.name;
518517
}
519518

520-
// Pete: leaving it here will get all constructors for a node
521-
// Pete: !!!! Is this even necessary?!
522-
if(entry.name.compare("<init>") == 0)
523-
{
524-
if(ctorCallbackData == nullptr)
525-
{
526-
ctorCallbackData = new ConstructorCallbackData(this);
527-
}
528-
529-
ctorCallbackData->candidates.push_back(entry);
530-
}
531-
// Pete: send ctorCallbackData to all <something>ConstructorCallback so that they can pass it along where necessary
532-
533519
callbackData->candidates.push_back(entry);
534520
}
535521

@@ -571,6 +557,7 @@ Local<Function> MetadataNode::SetMembersFromStaticMetadata(Isolate *isolate, Loc
571557
callbackData->candidates.push_back(entry);
572558
}
573559

560+
//attach .extend function
574561
auto extendFuncName = V8StringConstants::GetExtend();
575562
auto extendFuncTemplate = FunctionTemplate::New(isolate, ExtendCallMethodCallback, External::New(isolate, this));
576563
ctorFunction->Set(extendFuncName, extendFuncTemplate->GetFunction());

0 commit comments

Comments
 (0)