Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions src/disp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,9 +1104,18 @@ void VariantObject::NodeGet(Local<Name> name, const PropertyCallbackInfoGetter&
std::wstring type, name;
if (self->value.vt & VT_BYREF) type += L"byref:";
if (self->value.vt & VT_ARRAY) type = L"array:";
if (vtypes.find(self->value.vt & VT_TYPEMASK, name)) type += name;
else type += std::to_wstring(self->value.vt & VT_TYPEMASK);
if (vtypes.find(self->value.vt & VT_TYPEMASK, name)) {
type += name;
}
else if (self->value.vt & VT_UNKNOWN) {
type += L"IUnknown";
}
else {
type += std::to_wstring(self->value.vt & VT_TYPEMASK);
}
Local<String> text = v8str(isolate, type.c_str());
// Debugger was crashing on IUnknown due to missing return value here
args.GetReturnValue().Set(text);
}
else if (_wcsicmp(id, L"__proto__") == 0) {
Local<Function> func;
Expand All @@ -1123,10 +1132,10 @@ void VariantObject::NodeGet(Local<Name> name, const PropertyCallbackInfoGetter&
if ((self->value.vt & VT_ARRAY) != 0) {
args.GetReturnValue().Set((uint32_t)self->value.ArrayLength());
}
else {
args.GetReturnValue().SetUndefined();
}
}
else {
args.GetReturnValue().SetUndefined();
}
}
else {
Local<Function> func;
if (clazz_methods.get(isolate, id, &func)) {
Expand Down
Loading