Bug 144847 - JSON.stringify shouldn't use generic get() to access Array.length
Summary: JSON.stringify shouldn't use generic get() to access Array.length
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2015-05-10 14:05 PDT by Andreas Kling
Modified: 2015-05-11 10:49 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.71 KB, patch)
2015-05-10 14:06 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2015-05-10 14:05:32 PDT
When we know the value being serialized is a JSArray, we can downcast and call length() directly instead of doing a generic get().
Comment 1 Andreas Kling 2015-05-10 14:06:02 PDT
Created attachment 252825 [details]
Patch
Comment 2 Geoffrey Garen 2015-05-11 09:59:54 PDT
Comment on attachment 252825 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2015-05-11 10:49:21 PDT
Comment on attachment 252825 [details]
Patch

Clearing flags on attachment: 252825

Committed r184107: <http://trac.webkit.org/changeset/184107>
Comment 4 WebKit Commit Bot 2015-05-11 10:49:25 PDT
All reviewed patches have been landed.  Closing bug.