Changeset 141556 in webkit


Ignore:
Timestamp:
Feb 1, 2013 12:52:01 AM (11 years ago)
Author:
tsepez@chromium.org
Message:

Dubious cast from HTMLCollection to HTMLAllCollection
https://bugs.webkit.org/show_bug.cgi?id=108538

Reviewed by Adam Barth.

Patch is tested by enabling V8 binding integrity on HTMLAllCollection and
running the existing tests without introducing new crashes.

  • dom/Document.cpp:

(WebCore::Document::all):
Pass correct type to template.

  • html/HTMLAllCollection.cpp:

(WebCore::HTMLAllCollection::create):
(WebCore::HTMLAllCollection::HTMLAllCollection):

  • html/HTMLAllCollection.h:

(HTMLAllCollection):
Make create() method arguments compatible with template above.

  • html/HTMLAllCollection.idl:

Enable binding integrity.

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141555 r141556  
     12013-02-01  Tom Sepez  <tsepez@chromium.org>
     2
     3        Dubious cast from HTMLCollection to HTMLAllCollection
     4        https://bugs.webkit.org/show_bug.cgi?id=108538
     5
     6        Reviewed by Adam Barth.
     7
     8        Patch is tested by enabling V8 binding integrity on HTMLAllCollection and
     9        running the existing tests without introducing new crashes.
     10
     11        * dom/Document.cpp:
     12        (WebCore::Document::all):
     13        Pass correct type to template.
     14       
     15        * html/HTMLAllCollection.cpp:
     16        (WebCore::HTMLAllCollection::create):
     17        (WebCore::HTMLAllCollection::HTMLAllCollection):
     18        * html/HTMLAllCollection.h:
     19        (HTMLAllCollection):
     20        Make create() method arguments compatible with template above.
     21
     22        * html/HTMLAllCollection.idl:
     23        Enable binding integrity.
     24
    1252013-02-01  Ken Kania  <kkania@chromium.org>
    226
  • trunk/Source/WebCore/dom/Document.cpp

    r141524 r141556  
    43704370PassRefPtr<HTMLCollection> Document::all()
    43714371{
    4372     return ensureCachedCollection(DocAll);
     4372    return ensureRareData()->ensureNodeLists()->addCacheWithAtomicName<HTMLAllCollection>(this, DocAll);
    43734373}
    43744374
  • trunk/Source/WebCore/html/HTMLAllCollection.cpp

    r123281 r141556  
    3131namespace WebCore {
    3232
    33 PassRefPtr<HTMLAllCollection> HTMLAllCollection::create(Document* document)
     33PassRefPtr<HTMLAllCollection> HTMLAllCollection::create(Node* node, CollectionType type)
    3434{
    35     return adoptRef(new HTMLAllCollection(document));
     35    return adoptRef(new HTMLAllCollection(node, type));
    3636}
    3737
    38 HTMLAllCollection::HTMLAllCollection(Document* document)
    39     : HTMLCollection(document, DocAll, DoesNotOverrideItemAfter)
     38HTMLAllCollection::HTMLAllCollection(Node* node, CollectionType type)
     39    : HTMLCollection(node, type, DoesNotOverrideItemAfter)
    4040{
    4141}
  • trunk/Source/WebCore/html/HTMLAllCollection.h

    r122115 r141556  
    3333class HTMLAllCollection : public HTMLCollection {
    3434public:
    35     static PassRefPtr<HTMLAllCollection> create(Document*);
     35    static PassRefPtr<HTMLAllCollection> create(Node*, CollectionType);
    3636    virtual ~HTMLAllCollection();
    3737
     
    3939
    4040private:
    41     HTMLAllCollection(Document*);
     41    HTMLAllCollection(Node*, CollectionType);
    4242};
    4343
  • trunk/Source/WebCore/html/HTMLAllCollection.idl

    r141034 r141556  
    3131    GenerateIsReachable=ImplOwnerNodeRoot,
    3232    V8DependentLifetime,
    33     V8SkipVTableValidation
    3433] interface HTMLAllCollection {
    3534    readonly attribute unsigned long length;
Note: See TracChangeset for help on using the changeset viewer.