Bug 119843

Summary: PropertySlot::setValue is ambiguous
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
fix ggaren: review+

Gavin Barraclough
Reported 2013-08-15 08:27:16 PDT
There are three different versions of PropertySlot::setValue, one for cacheable properties, and two that are used interchangeably and inconsistently. The problematic variants are the ones that just take a value, and one that takes a value and also the object containing the property. Unify on always providing the object, and remove the version that just takes a value. This always works except for JSString, where we optimize out the object (logically we should be instantiating a temporary StringObject on every property access). Provide a version of setValue that takes a JSString as the owner of the property. We won't store this, but it makes it clear that this interface should only be used from JSString.
Attachments
fix (12.19 KB, patch)
2013-08-15 08:33 PDT, Gavin Barraclough
ggaren: review+
Gavin Barraclough
Comment 1 2013-08-15 08:33:09 PDT
Geoffrey Garen
Comment 2 2013-08-15 09:40:49 PDT
Comment on attachment 208811 [details] fix View in context: https://bugs.webkit.org/attachment.cgi?id=208811&action=review > Source/JavaScriptCore/runtime/PropertySlot.h:104 > + void setValue(JSString*, JSValue value) This would be a good place for a piece of your ChangeLog comment: Logically, the base of a string property access is a temporary StringObject, but we optimize that away.
Gavin Barraclough
Comment 3 2013-08-15 11:48:04 PDT
Committed revision 154113.
Note You need to log in before you can comment on or make changes to this bug.