Bug 1528792 - Remove redundant code checking for Symbol values in js::ToNumberSlow. r=tcampbell

Differential Revision: https://phabricator.services.mozilla.com/D23152

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Orendorff 2019-03-12 15:17:09 +00:00
parent 8d46729792
commit 59ad2584d8

View File

@ -1671,13 +1671,6 @@ JS_PUBLIC_API bool js::ToNumberSlow(JSContext* cx, HandleValue v_,
*out = 0.0;
return true;
}
if (v.isSymbol()) {
if (!cx->helperThread()) {
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
JSMSG_SYMBOL_TO_NUMBER);
}
return false;
}
if (v.isUndefined()) {
*out = GenericNaN();