RESOLVED FIXED 143799
Number.parseInt is not === global parseInt in nightly r182673
https://bugs.webkit.org/show_bug.cgi?id=143799
Summary Number.parseInt is not === global parseInt in nightly r182673
Jordan Harband
Reported 2015-04-15 15:09:47 PDT
The spec requires that `Number.parseInt === parseInt`, but that's not the case in WebKit nightly.
Attachments
Patch (9.79 KB, patch)
2015-04-15 23:23 PDT, Jordan Harband
no flags
Patch (10.19 KB, patch)
2015-04-16 13:23 PDT, Jordan Harband
no flags
Jordan Harband
Comment 1 2015-04-15 15:10:09 PDT
Linking to other Number.parseInt bug.
Jordan Harband
Comment 2 2015-04-15 15:14:59 PDT
(fwiw, this was also a bug in Firefox 37, but it's now fixed in their nightly v40)
Jordan Harband
Comment 3 2015-04-15 23:23:23 PDT
Jordan Harband
Comment 4 2015-04-16 13:23:31 PDT
Darin Adler
Comment 5 2015-04-16 17:40:18 PDT
Comment on attachment 250947 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=250947&action=review > Source/JavaScriptCore/runtime/NumberConstructor.cpp:76 > + putDirectWithoutTransition(vm, Identifier::fromString(&vm, "parseInt"), numberPrototype->globalObject()->parseIntFunction(), DontEnum | Function); Why isn’t this using vm.propertyNames->parseInt?
Jordan Harband
Comment 6 2015-04-16 17:42:06 PDT
(In reply to comment #5) > Comment on attachment 250947 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=250947&action=review > > > Source/JavaScriptCore/runtime/NumberConstructor.cpp:76 > > + putDirectWithoutTransition(vm, Identifier::fromString(&vm, "parseInt"), numberPrototype->globalObject()->parseIntFunction(), DontEnum | Function); > > Why isn’t this using vm.propertyNames->parseInt? I didn't want to couple the `Number` function name with the global name - they're the same string, and the same function, but they're conceptually not linked in the same way. Would you prefer I change it to do so?
WebKit Commit Bot
Comment 7 2015-04-16 18:37:14 PDT
Comment on attachment 250947 [details] Patch Clearing flags on attachment: 250947 Committed r182938: <http://trac.webkit.org/changeset/182938>
WebKit Commit Bot
Comment 8 2015-04-16 18:37:18 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.