mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 07:47:32 +09:00
Issue #1240 - Part 7 - Handle BigInt values in XPCVariant code. https://bugzilla.mozilla.org/show_bug.cgi?id=1603055
This commit is contained in:
parent
1355043d40
commit
4a3f1b7570
1 changed files with 5 additions and 5 deletions
|
|
@ -179,7 +179,7 @@ XPCArrayHomogenizer::GetTypeForArray(JSContext* cx, HandleObject array,
|
|||
type = tDbl;
|
||||
} else if (val.isBoolean()) {
|
||||
type = tBool;
|
||||
} else if (val.isUndefined() || val.isSymbol()) {
|
||||
} else if (val.isUndefined() || val.isSymbol() || val.isBigInt()) {
|
||||
state = tVar;
|
||||
break;
|
||||
} else if (val.isNull()) {
|
||||
|
|
@ -187,7 +187,7 @@ XPCArrayHomogenizer::GetTypeForArray(JSContext* cx, HandleObject array,
|
|||
} else if (val.isString()) {
|
||||
type = tStr;
|
||||
} else {
|
||||
MOZ_ASSERT(val.isObject(), "invalid type of jsval!");
|
||||
MOZ_RELEASE_ASSERT(val.isObject(), "invalid type of jsval!");
|
||||
jsobj = &val.toObject();
|
||||
|
||||
bool isArray;
|
||||
|
|
@ -273,8 +273,8 @@ bool XPCVariant::InitializeData(JSContext* cx)
|
|||
mData.SetFromBool(val.toBoolean());
|
||||
return true;
|
||||
}
|
||||
// We can't represent symbol on C++ side, so pretend it is void.
|
||||
if (val.isUndefined() || val.isSymbol()) {
|
||||
// We can't represent symbol or BigInt on C++ side, so pretend it is void.
|
||||
if (val.isUndefined() || val.isSymbol() || val.isBigInt()) {
|
||||
mData.SetToVoid();
|
||||
return true;
|
||||
}
|
||||
|
|
@ -302,7 +302,7 @@ bool XPCVariant::InitializeData(JSContext* cx)
|
|||
}
|
||||
|
||||
// leaving only JSObject...
|
||||
MOZ_ASSERT(val.isObject(), "invalid type of jsval!");
|
||||
MOZ_RELEASE_ASSERT(val.isObject(), "invalid type of jsval!");
|
||||
|
||||
RootedObject jsobj(cx, &val.toObject());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue