Bug 111230

Summary: [V8] HTMLDocument.all should have [Replaceable]
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, esprehn+autocc, japhet, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Kentaro Hara 2013-03-01 15:57:26 PST
(Although HTMLDocument.all is already removed from the spec,) it is expected to behave as a [Replaceable] attribute. By adding a [Replaceable] IDL attribute, we can remove custom implementation of HTMLDocument.all.
Comment 1 Kentaro Hara 2013-03-01 15:59:22 PST
Created attachment 191057 [details]
Patch
Comment 2 Adam Barth 2013-03-02 23:24:33 PST
Comment on attachment 191057 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=191057&action=review

> Source/WebCore/ChangeLog:14
> +        I confimed that exactly the same code is generated for .all getter
> +        and setter.

Really!  Wow, I had no idea.  Do all Replaceable attributes call ForceSet?
Comment 3 Adam Barth 2013-03-02 23:24:53 PST
Comment on attachment 191057 [details]
Patch

Sorry, misclick.
Comment 4 Kentaro Hara 2013-03-03 16:18:36 PST
Committed r144591: <http://trac.webkit.org/changeset/144591>
Comment 5 Kentaro Hara 2013-03-03 16:21:30 PST
(In reply to comment #2)
> (From update of attachment 191057 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=191057&action=review
> 
> > Source/WebCore/ChangeLog:14
> > +        I confimed that exactly the same code is generated for .all getter
> > +        and setter.
> 
> Really!  Wow, I had no idea.  Do all Replaceable attributes call ForceSet?

Yes. All non-custom replaceable setters call info.This()->ForceSet(). 'info.This()->' makes sense because replaceable attributes have to be set on DOM instances (not prototype objects). On the other hand, I have no idea why we need to call ForceSet() instead of Set().