Backed out changeset cc20c56545bd (bug 1527900) for spidermoneky build bustages CLOSED TREE

This commit is contained in:
shindli 2019-03-01 00:15:42 +02:00
parent 12c70e6b88
commit 6820dc6ccd
5 changed files with 0 additions and 46 deletions

View File

@ -688,7 +688,6 @@ MSG_DEF(JSMSG_BIGINT_NEGATIVE_EXPONENT, 0, JSEXN_RANGEERR, "BigInt negative expo
MSG_DEF(JSMSG_BIGINT_INVALID_SYNTAX, 0, JSEXN_SYNTAXERR, "invalid BigInt syntax")
MSG_DEF(JSMSG_NOT_BIGINT, 0, JSEXN_TYPEERR, "not a BigInt")
MSG_DEF(JSMSG_BIGINT_NOT_SERIALIZABLE, 0, JSEXN_TYPEERR, "BigInt value can't be serialized in JSON")
MSG_DEF(JSMSG_SC_BIGINT_DISABLED, 0, JSEXN_ERR, "BigInt not cloned - feature disabled in receiver")
// BinAST
MSG_DEF(JSMSG_BINAST, 1, JSEXN_SYNTAXERR, "BinAST Parsing Error: {0}")

View File

@ -43,9 +43,6 @@
--spectre-mitigations=on
--more-compartments
# Experimental JS language features
--no-bigint
# GC-related
# These 2 flags can cause the shell to slow down
# --gc-zeal=2

View File

@ -6181,13 +6181,6 @@ static bool NewGlobal(JSContext* cx, unsigned argc, Value* vp) {
behaviors.setDisableLazyParsing(v.toBoolean());
}
if (!JS_GetProperty(cx, opts, "enableBigInt", &v)) {
return false;
}
if (v.isBoolean()) {
creationOptions.setBigIntEnabled(v.toBoolean());
}
if (!JS_GetProperty(cx, opts, "systemPrincipal", &v)) {
return false;
}

View File

@ -1,29 +0,0 @@
// |reftest| skip-if(!xulRuntime.shell)
// -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
function testBigInt(b) {
var a = deserialize(serialize(b));
assertEq(typeof b, "bigint");
assertEq(typeof a, "bigint");
assertEq(a, b);
}
testBigInt(0n);
testBigInt(-1n);
testBigInt(1n);
testBigInt(0xffffFFFFffffFFFFffffFFFFffffFFFFn);
testBigInt(-0xffffFFFFffffFFFFffffFFFFffffFFFFn);
var g = newGlobal({ enableBigInt: false });
var deserializeNoBigInt = g.evaluate("deserialize");
assertEq(deserializeNoBigInt(serialize(1)), 1);
assertThrows(() => deserializeNoBigInt(serialize(1n)))
assertThrows(() => deserializeNoBigInt(serialize(0n)))
assertThrows(() => deserializeNoBigInt(serialize(0xffffffn)))
assertThrows(() => deserializeNoBigInt(serialize(-1n)))
reportCompare(0, 0, 'ok');

View File

@ -2043,12 +2043,6 @@ JSString* JSStructuredCloneReader::readString(uint32_t data) {
}
BigInt* JSStructuredCloneReader::readBigInt(uint32_t data) {
if (!context()->realm()->creationOptions().getBigIntEnabled()) {
JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr,
JSMSG_SC_BIGINT_DISABLED);
return nullptr;
}
size_t length = data & JS_BITMASK(31);
bool isNegative = data & (1 << 31);
if (length == 0) {