summaryrefslogtreecommitdiff
path: root/js/xpconnect/src/XPCVariant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/src/XPCVariant.cpp')
-rw-r--r--js/xpconnect/src/XPCVariant.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/xpconnect/src/XPCVariant.cpp b/js/xpconnect/src/XPCVariant.cpp
index f8363993c7..c663e7ebf2 100644
--- a/js/xpconnect/src/XPCVariant.cpp
+++ b/js/xpconnect/src/XPCVariant.cpp
@@ -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());