ES5 prohibits parseInt from supporting octal
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jan 2012 04:32:00 +0000 (04:32 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jan 2012 04:32:00 +0000 (04:32 +0000)
commitfc523d5442953d618d428906f584749b92a92127
treeeae71bee06d0db5e53a8adc01bb8b445db46f466
parentf75057ccc67e2bbb5d67c463460722ce1a852a30
ES5 prohibits parseInt from supporting octal
https://bugs.webkit.org/show_bug.cgi?id=75455

Reviewed by Sam Weinig.

See sections 15.1.2.2 and annex E.

Source/JavaScriptCore:

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::parseInt):

LayoutTests:

* fast/js/kde/GlobalObject-expected.txt:
* fast/js/kde/script-tests/GlobalObject.js:
    - Change test to check for correct result.
* sputnik/Implementation_Diagnostics/S15.1.2.2_D1.1-expected.txt:
* sputnik/Implementation_Diagnostics/S15.1.2.2_D1.2-expected.txt:
    - One test asserts parseInt handles octal, one asserts it does not!
      This patch switches which one passes & which fails.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/js/kde/GlobalObject-expected.txt
LayoutTests/fast/js/kde/script-tests/GlobalObject.js
LayoutTests/sputnik/Implementation_Diagnostics/S15.1.2.2_D1.1-expected.txt
LayoutTests/sputnik/Implementation_Diagnostics/S15.1.2.2_D1.2-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp