Title: [184078] releases/WebKitGTK/webkit-2.8
Revision
184078
Author
[email protected]
Date
2015-05-11 04:14:33 -0700 (Mon, 11 May 2015)

Log Message

Merge r182863 - Number.parseInt in nightly r182673 has wrong length
https://bugs.webkit.org/show_bug.cgi?id=143657

Patch by Jordan Harband <[email protected]> on 2015-04-15
Reviewed by Benjamin Poulain.

Source/_javascript_Core:

Correcting funciton length from 1, to 2, to match spec
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.parseint

* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::finishCreation):

LayoutTests:

* js/number-constructor-expected.txt:
* js/script-tests/number-constructor.js:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog (184077 => 184078)


--- releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog	2015-05-11 11:06:25 UTC (rev 184077)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog	2015-05-11 11:14:33 UTC (rev 184078)
@@ -1,3 +1,13 @@
+2015-04-15  Jordan Harband  <[email protected]>
+
+        Number.parseInt in nightly r182673 has wrong length
+        https://bugs.webkit.org/show_bug.cgi?id=143657
+
+        Reviewed by Benjamin Poulain.
+
+        * js/number-constructor-expected.txt:
+        * js/script-tests/number-constructor.js:
+
 2015-04-14  Zalan Bujtas  <[email protected]>
 
         Make inline continuation style change logic consistent.

Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/js/number-constructor-expected.txt (184077 => 184078)


--- releases/WebKitGTK/webkit-2.8/LayoutTests/js/number-constructor-expected.txt	2015-05-11 11:06:25 UTC (rev 184077)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/js/number-constructor-expected.txt	2015-05-11 11:14:33 UTC (rev 184078)
@@ -122,6 +122,7 @@
 PASS Number.parseFloat("20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") is 2e+307
 PASS Number.parseFloat("200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") is Infinity
 PASS Number.parseFloat(foo) threw exception ReferenceError: Can't find variable: foo.
+PASS Number.parseInt.length is 2
 PASS Number.parseInt("0") is 0
 PASS Number.parseInt("-0") is -0
 PASS Number.parseInt("1") is 1

Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/js/script-tests/number-constructor.js (184077 => 184078)


--- releases/WebKitGTK/webkit-2.8/LayoutTests/js/script-tests/number-constructor.js	2015-05-11 11:06:25 UTC (rev 184077)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/js/script-tests/number-constructor.js	2015-05-11 11:14:33 UTC (rev 184078)
@@ -130,6 +130,7 @@
 shouldThrow('Number.parseFloat(foo)');
 
 // parseInt
+shouldBe('Number.parseInt.length', '2');
 shouldBe('Number.parseInt("0")', '0');
 shouldBe('Number.parseInt("-0")', '-0');
 shouldBe('Number.parseInt("1")', '1');

Modified: releases/WebKitGTK/webkit-2.8/Source/_javascript_Core/ChangeLog (184077 => 184078)


--- releases/WebKitGTK/webkit-2.8/Source/_javascript_Core/ChangeLog	2015-05-11 11:06:25 UTC (rev 184077)
+++ releases/WebKitGTK/webkit-2.8/Source/_javascript_Core/ChangeLog	2015-05-11 11:14:33 UTC (rev 184078)
@@ -1,3 +1,16 @@
+2015-04-15  Jordan Harband  <[email protected]>
+
+        Number.parseInt in nightly r182673 has wrong length
+        https://bugs.webkit.org/show_bug.cgi?id=143657
+
+        Reviewed by Benjamin Poulain.
+
+        Correcting funciton length from 1, to 2, to match spec
+        https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.parseint
+
+        * runtime/NumberConstructor.cpp:
+        (JSC::NumberConstructor::finishCreation):
+
 2015-04-14  Michael Saboff  <[email protected]>
 
         DFG register fillSpeculate*() functions should validate incoming spill format is compatible with requested fill format

Modified: releases/WebKitGTK/webkit-2.8/Source/_javascript_Core/runtime/NumberConstructor.cpp (184077 => 184078)


--- releases/WebKitGTK/webkit-2.8/Source/_javascript_Core/runtime/NumberConstructor.cpp	2015-05-11 11:06:25 UTC (rev 184077)
+++ releases/WebKitGTK/webkit-2.8/Source/_javascript_Core/runtime/NumberConstructor.cpp	2015-05-11 11:14:33 UTC (rev 184078)
@@ -73,7 +73,7 @@
     putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "isNaN"), 1, numberConstructorFuncIsNaN, NoIntrinsic, DontEnum | Function);
     putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "isSafeInteger"), 1, numberConstructorFuncIsSafeInteger, NoIntrinsic, DontEnum | Function);
     putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "parseFloat"), 1, globalFuncParseFloat, NoIntrinsic, DontEnum | Function);
-    putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "parseInt"), 1, globalFuncParseInt, NoIntrinsic, DontEnum | Function);
+    putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "parseInt"), 2, globalFuncParseInt, NoIntrinsic, DontEnum | Function);
 }
 
 // ECMA 15.7.1
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to