Bug 96878 - JSObject.cpp and JSArray.cpp have inconsistent tests for the invalid array index case
Summary: JSObject.cpp and JSArray.cpp have inconsistent tests for the invalid array in...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-15 22:26 PDT by Filip Pizlo
Modified: 2012-09-16 00:22 PDT (History)
2 users (show)

See Also:


Attachments
the patch (3.22 KB, patch)
2012-09-15 22:35 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.