| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 8391bef9490d150e6318de906020622029737a53..3b721f7c93a83e08dc4a3f95d8a7767d5c732f44 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -5959,8 +5959,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringToNumber) {
|
| }
|
|
|
| // Slower case.
|
| + int flags = ALLOW_HEX;
|
| + if (FLAG_harmony_numeric_literals) {
|
| + // The current spec draft has not updated "ToNumber Applied to the String
|
| + // Type", https://bugs.ecmascript.org/show_bug.cgi?id=1584
|
| + flags |= ALLOW_OCTAL | ALLOW_BINARY;
|
| + }
|
| return isolate->heap()->NumberFromDouble(
|
| - StringToDouble(isolate->unicode_cache(), subject, ALLOW_HEX));
|
| + StringToDouble(isolate->unicode_cache(), subject, flags));
|
| }
|
|
|
|
|
|
|