Skip to content

Commit 0eb9052

Browse files
committed
fix: pass entry by reference to SymbolHasInstanceCallback
1 parent 98970ae commit 0eb9052

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test-app/runtime/src/main/cpp/MetadataNode.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ void MetadataNode::PackageGetterCallback(Local<Name> property, const PropertyCal
14531453
// return true;
14541454
// }
14551455
// });
1456-
RegisterSymbolHasInstanceCallback(isolate, &child, cachedItem);
1456+
RegisterSymbolHasInstanceCallback(isolate, child, cachedItem);
14571457
}
14581458

14591459
V8SetPrivateValue(isolate, thiz, strProperty, cachedItem);
@@ -2138,7 +2138,7 @@ void MetadataNode::SetMissingBaseMethods(
21382138
}
21392139
}
21402140

2141-
void MetadataNode::RegisterSymbolHasInstanceCallback(Isolate* isolate, MetadataEntry* entry, Local<Value> interface) {
2141+
void MetadataNode::RegisterSymbolHasInstanceCallback(Isolate* isolate, MetadataEntry& entry, Local<Value> interface) {
21422142
if (interface->IsNullOrUndefined()) {
21432143
return;
21442144
}
@@ -2193,9 +2193,9 @@ void MetadataNode::SymbolHasInstanceCallback(const v8::FunctionCallbackInfo<v8::
21932193
info.GetReturnValue().Set(isInstanceOf);
21942194
}
21952195

2196-
std::string MetadataNode::GetJniClassName(MetadataEntry* entry) {
2196+
std::string MetadataNode::GetJniClassName(MetadataEntry& entry) {
21972197
std::stack<string> s;
2198-
MetadataTreeNode* n = entry->treeNode;
2198+
MetadataTreeNode* n = entry.treeNode;
21992199
while (n != nullptr && n->name != "") {
22002200
s.push(n->name);
22012201
n = n->parent;

test-app/runtime/src/main/cpp/MetadataNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ class MetadataNode {
161161
static bool GetExtendLocation(v8::Isolate* isolate, std::string& extendLocation, bool isTypeScriptExtend);
162162
static ExtendedClassCacheData GetCachedExtendedClassData(v8::Isolate* isolate, const std::string& proxyClassName);
163163

164-
static void RegisterSymbolHasInstanceCallback(v8::Isolate* isolate, MetadataEntry* entry, v8::Local<v8::Value> interface);
164+
static void RegisterSymbolHasInstanceCallback(v8::Isolate* isolate, MetadataEntry& entry, v8::Local<v8::Value> interface);
165165
static void SymbolHasInstanceCallback(const v8::FunctionCallbackInfo<v8::Value>& info);
166-
static std::string GetJniClassName(MetadataEntry* entry);
166+
static std::string GetJniClassName(MetadataEntry& entry);
167167

168168
static v8::Local<v8::Function> Wrap(v8::Isolate* isolate, const v8::Local<v8::Function>& function, const std::string& name, const std::string& origin, bool isCtorFunc);
169169

0 commit comments

Comments
 (0)