| Summary: | Number.parseInt is not === global parseInt in nightly r182673 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jordan Harband <ljharb> | ||||||
| Component: | JavaScriptCore | Assignee: | Jordan Harband <ljharb> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | benjamin, commit-queue, ggaren, ysuzuki | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | 143657 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
|
Description
Jordan Harband
2015-04-15 15:09:47 PDT
Linking to other Number.parseInt bug. (fwiw, this was also a bug in Firefox 37, but it's now fixed in their nightly v40) Created attachment 250902 [details]
Patch
Created attachment 250947 [details]
Patch
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? (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? Comment on attachment 250947 [details] Patch Clearing flags on attachment: 250947 Committed r182938: <http://trac.webkit.org/changeset/182938> All reviewed patches have been landed. Closing bug. |