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>
Severity: Normal CC: sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
the patch none

Description Filip Pizlo 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.
Comment 1 Filip Pizlo 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.
Comment 2 Filip Pizlo 2012-09-15 22:35:33 PDT
Created attachment 164308 [details]
the patch
Comment 3 WebKit Review Bot 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>
Comment 4 WebKit Review Bot 2012-09-16 00:22:27 PDT
All reviewed patches have been landed.  Closing bug.