Bug 111230 - [V8] HTMLDocument.all should have [Replaceable]
Summary: [V8] HTMLDocument.all should have [Replaceable]
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-01 15:57 PST by Kentaro Hara
Modified: 2013-03-03 16:21 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.53 KB, patch)
2013-03-01 15:59 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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().