Bug 138570

Summary: Object.hasOwnProperty should be more efficient when the property name is not an AtomicString.
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: NEW    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Andreas Kling
Reported 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.
Attachments
Patch (2.15 KB, patch)
2014-11-10 11:48 PST, Andreas Kling
no flags
Andreas Kling
Comment 1 2014-11-10 11:48:10 PST
Note You need to log in before you can comment on or make changes to this bug.