Changeset 87618 in webkit


Ignore:
Timestamp:
May 28, 2011 11:18:49 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-28 Gavin Peters <gavinp@chromium.org>

Reviewed by Adam Barth.

prevent HTMLLinkElement from watching multiple CachedResources
https://bugs.webkit.org/show_bug.cgi?id=61686

If we modify an existing link element, stop listening to the previous
cached resource, to prevent double notifications (which crash).

  • fast/dom/HTMLLinkElement/prefetch-too-many-clients-expected.txt: Added.
  • fast/dom/HTMLLinkElement/prefetch-too-many-clients.html: Added.
  • platform/gtk/Skipped:
  • platform/mac/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped:

2011-05-28 Gavin Peters <gavinp@chromium.org>

Reviewed by Adam Barth.

prevent HTMLLinkElement from watching multiple CachedResources
https://bugs.webkit.org/show_bug.cgi?id=61686

If we modify an existing link element, stop listening to the previous
cached resource, to prevent double notifications (which crash).

Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html

  • html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process):
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87617 r87618  
     12011-05-28  Gavin Peters  <gavinp@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        prevent HTMLLinkElement from watching multiple CachedResources
     6        https://bugs.webkit.org/show_bug.cgi?id=61686
     7
     8        If we modify an existing link element, stop listening to the previous
     9        cached resource, to prevent double notifications (which crash).
     10
     11        * fast/dom/HTMLLinkElement/prefetch-too-many-clients-expected.txt: Added.
     12        * fast/dom/HTMLLinkElement/prefetch-too-many-clients.html: Added.
     13        * platform/gtk/Skipped:
     14        * platform/mac/Skipped:
     15        * platform/qt/Skipped:
     16        * platform/win/Skipped:
     17
    1182011-05-28  Tonis Tiigi  <tonistiigi@gmail.com>
    219
  • trunk/LayoutTests/platform/gtk/Skipped

    r87542 r87618  
    943943fast/dom/HTMLLinkElement/link-and-subresource-test.html
    944944fast/dom/HTMLLinkElement/prefetch.html
     945fast/dom/HTMLLinkElement/prefetch-beforeload.html
    945946fast/dom/HTMLLinkElement/prefetch-onerror.html
    946947fast/dom/HTMLLinkElement/prefetch-onload.html
    947 fast/dom/HTMLLinkElement/prefetch-beforeload.html
     948fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
    948949fast/dom/HTMLLinkElement/prerender.html
    949950fast/dom/HTMLLinkElement/subresource.html
  • trunk/LayoutTests/platform/mac/Skipped

    r87423 r87618  
    183183fast/dom/HTMLLinkElement/prefetch-onerror.html
    184184fast/dom/HTMLLinkElement/prefetch-onload.html
     185fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
    185186fast/dom/HTMLLinkElement/prerender.html
    186187fast/dom/HTMLLinkElement/subresource.html
  • trunk/LayoutTests/platform/qt/Skipped

    r87503 r87618  
    19491949fast/dom/HTMLLinkElement/prefetch-onerror.html
    19501950fast/dom/HTMLLinkElement/prefetch-onload.html
     1951fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
    19511952fast/dom/HTMLLinkElement/prerender.html
    19521953fast/dom/HTMLLinkElement/subresource.html
  • trunk/LayoutTests/platform/win/Skipped

    r87511 r87618  
    10081008fast/dom/HTMLLinkElement/prefetch-onerror.html
    10091009fast/dom/HTMLLinkElement/prefetch-onload.html
     1010fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
    10101011http/tests/misc/link-rel-prefetch-and-subresource.html
    10111012fast/dom/HTMLLinkElement/prerender.html
  • trunk/Source/WebCore/ChangeLog

    r87617 r87618  
     12011-05-28  Gavin Peters  <gavinp@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        prevent HTMLLinkElement from watching multiple CachedResources
     6        https://bugs.webkit.org/show_bug.cgi?id=61686
     7
     8        If we modify an existing link element, stop listening to the previous
     9        cached resource, to prevent double notifications (which crash).
     10
     11        Test: fast/dom/HTMLLinkElement/prefetch-too-many-clients.html
     12
     13        * html/HTMLLinkElement.cpp:
     14        (WebCore::HTMLLinkElement::process):
     15
    1162011-05-28  Tonis Tiigi  <tonistiigi@gmail.com>
    217
  • trunk/Source/WebCore/html/HTMLLinkElement.cpp

    r87239 r87618  
    267267
    268268        ResourceRequest linkRequest(document()->completeURL(m_url));
     269       
     270        if (m_cachedLinkResource) {
     271            m_cachedLinkResource->removeClient(this);
     272            m_cachedLinkResource = 0;
     273        }
    269274        m_cachedLinkResource = document()->cachedResourceLoader()->requestLinkResource(type, linkRequest, priority);
    270275        if (m_cachedLinkResource)
Note: See TracChangeset for help on using the changeset viewer.