Bug 96878

Summary: JSObject.cpp and JSArray.cpp have inconsistent tests for the invalid array index case
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch none

Filip Pizlo
Reported 2012-09-15 22:26:51 PDT
The UNLIKELY() macro buys us nothing here anyway so we should probably kill off our use of it. Though I'm all for surgical uses of UNLIKELY() in places where it matters, I don't like using it in places where we know it does nothing.
Attachments
the patch (3.22 KB, patch)
2012-09-15 22:35 PDT, Filip Pizlo
no flags
Filip Pizlo
Comment 1 2012-09-15 22:29:29 PDT
As well, JSArray.cpp has one place where it does the same test but by comparing directly against 0xFFFFFFFF. It should really be comparing against MAX_ARRAY_INDEX.
Filip Pizlo
Comment 2 2012-09-15 22:35:33 PDT
Created attachment 164308 [details] the patch
WebKit Review Bot
Comment 3 2012-09-16 00:22:24 PDT
Comment on attachment 164308 [details] the patch Clearing flags on attachment: 164308 Committed r128706: <http://trac.webkit.org/changeset/128706>
WebKit Review Bot
Comment 4 2012-09-16 00:22:27 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.