mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #1240 - Part 1 - Define a new BigInt primitive type. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 1.0. However leaving out the --enable-bigint changes.
This commit is contained in:
parent
748cac6e80
commit
f041afc61d
43 changed files with 411 additions and 20 deletions
|
|
@ -1452,9 +1452,19 @@ js::ToNumberSlow(ExclusiveContext* cx, HandleValue v_, double* out)
|
|||
return false;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(v.isUndefined());
|
||||
*out = GenericNaN();
|
||||
return true;
|
||||
if (v.isUndefined()) {
|
||||
*out = GenericNaN();
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(v.isSymbol() || v.isBigInt());
|
||||
if (cx->isJSContext()) {
|
||||
unsigned errnum = JSMSG_SYMBOL_TO_NUMBER;
|
||||
if (v.isBigInt())
|
||||
errnum = JSMSG_BIGINT_TO_NUMBER;
|
||||
JS_ReportErrorNumberASCII(cx->asJSContext(), GetErrorMessage, nullptr, errnum);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(bool)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue