Bug 138570 - Object.hasOwnProperty should be more efficient when the property name is not an AtomicString.
Summary: Object.hasOwnProperty should be more efficient when the property name is not ...
Status: NEW
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:
Depends on:
Blocks:
 
Reported: 2014-11-10 11:47 PST by Andreas Kling
Modified: 2014-11-10 12:27 PST (History)
0 users

See Also:


Attachments
Patch (2.15 KB, patch)
2014-11-10 11:48 PST, 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 2014-11-10 11:47:26 PST
Use JSString::toExistingAtomicString() to avoid churning the AtomicString table
in case the property name being looked up isn't already present.

Add an early return in case it's not an existing AtomicString, since that also 
guarantees the string is not an existing own property name.
Comment 1 Andreas Kling 2014-11-10 11:48:10 PST
Created attachment 241294 [details]
Patch