Changeset 144055 in webkit


Ignore:
Timestamp:
Feb 26, 2013 7:43:07 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION (r143619): Crashes in three layout tests
https://bugs.webkit.org/show_bug.cgi?id=110588

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-02-26
Reviewed by Gustavo Noronha Silva.

Source/WebKit/gtk:

Guard against null main resource identifiers. The main resource
identifier can be null at various times during the load. A null
identifier is never equal to the ones we are looking to remove.

  • WebCoreSupport/FrameLoaderClientGtk.cpp:

(WebKit::FrameLoaderClient::dispatchDidFinishLoading): Use the new webkitWebViewRemoveSubresource helper.
(WebKit::FrameLoaderClient::dispatchDidFailLoading): ditto.

  • webkit/webkitwebview.cpp:

(webkitWebViewRemoveSubresource): Added this helper which removes a subresource, but
never touches the main resource. This is adapted from the old method, for which the
main resource branch was dead code.

  • webkit/webkitwebviewprivate.h: Update the method list.

LayoutTests:

  • platform/gtk/TestExpectations: Unskip some tests which are no longer

crashing.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r144053 r144055  
     12013-02-26  Martin Robinson  <mrobinson@igalia.com>
     2
     3        REGRESSION (r143619): Crashes in three layout tests
     4        https://bugs.webkit.org/show_bug.cgi?id=110588
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        * platform/gtk/TestExpectations: Unskip some tests which are no longer
     9        crashing.
     10
    1112013-02-26  Andrey Kosyakov  <caseq@chromium.org>
    212
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r144035 r144055  
    491491
    492492webkit.org/b/110222 fast/events/platform-wheelevent-with-delta-zero-crash.html [ Crash ]
    493 
    494 webkit.org/b/110588 http/tests/misc/iframe-reparenting-id-collision.html [ Crash Pass ]
    495 webkit.org/b/110588 http/tests/misc/window-open-then-write.html [ Crash ]
    496 webkit.org/b/110588 http/tests/xmlhttprequest/request-from-popup.html [ Crash ]
    497493
    498494webkit.org/b/110695 http/tests/security/cross-origin-local-storage-allowed.html [ Crash Pass ]
  • trunk/Source/WebKit/gtk/ChangeLog

    r143926 r144055  
     12013-02-26  Martin Robinson  <mrobinson@igalia.com>
     2
     3        REGRESSION (r143619): Crashes in three layout tests
     4        https://bugs.webkit.org/show_bug.cgi?id=110588
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        Guard against null main resource identifiers. The main resource
     9        identifier can be null at various times during the load. A null
     10        identifier is never equal to the ones we are looking to remove.
     11
     12        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     13        (WebKit::FrameLoaderClient::dispatchDidFinishLoading): Use the new webkitWebViewRemoveSubresource helper.
     14        (WebKit::FrameLoaderClient::dispatchDidFailLoading): ditto.
     15        * webkit/webkitwebview.cpp:
     16        (webkitWebViewRemoveSubresource): Added this helper which removes a subresource, but
     17        never touches the main resource. This is adapted from the old method, for which the
     18        main resource branch was dead code.
     19        * webkit/webkitwebviewprivate.h: Update the method list.
     20
    1212013-02-25  Andreas Kling  <akling@apple.com>
    222
  • trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r143619 r144055  
    10221022    g_signal_emit_by_name(webView, "resource-load-finished", m_frame, webResource);
    10231023
    1024     if (!g_str_equal(identifierString.get(), webView->priv->mainResourceIdentifier.data()))
    1025         webkit_web_view_remove_resource(webView, identifierString.get());
     1024    webkitWebViewRemoveSubresource(webView, identifierString.get());
    10261025}
    10271026
     
    10471046    g_signal_emit_by_name(webView, "resource-load-failed", m_frame, webResource, webError.get());
    10481047
    1049     if (!g_str_equal(identifierString.get(), webView->priv->mainResourceIdentifier.data()))
    1050         webkit_web_view_remove_resource(webView, identifierString.get());
     1048    webkitWebViewRemoveSubresource(webView, identifierString.get());
    10511049}
    10521050
  • trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp

    r143619 r144055  
    50675067}
    50685068
    5069 void webkit_web_view_remove_resource(WebKitWebView* webView, const char* identifier)
    5070 {
    5071     WebKitWebViewPrivate* priv = webView->priv;
    5072     if (g_str_equal(identifier, priv->mainResourceIdentifier.data())) {
    5073         priv->mainResourceIdentifier = "";
    5074         priv->mainResource = 0;
    5075     } else
    5076       g_hash_table_remove(priv->subResources.get(), identifier);
     5069void webkitWebViewRemoveSubresource(WebKitWebView* webView, const char* identifier)
     5070{
     5071    ASSERT(identifier);
     5072
     5073    // Don't remove the main resource.
     5074    const CString& mainResource = webView->priv->mainResourceIdentifier;
     5075    if (!mainResource.isNull() && g_str_equal(identifier, mainResource.data()))
     5076        return;
     5077    g_hash_table_remove(webView->priv->subResources.get(), identifier);
    50775078}
    50785079
  • trunk/Source/WebKit/gtk/webkit/webkitwebviewprivate.h

    r141566 r144055  
    130130void webkit_web_view_add_resource(WebKitWebView*, const char*, WebKitWebResource*);
    131131void webkit_web_view_add_main_resource(WebKitWebView*, const char*, WebKitWebResource*);
    132 void webkit_web_view_remove_resource(WebKitWebView*, const char*);
     132void webkitWebViewRemoveSubresource(WebKitWebView*, const char*);
    133133WebKitWebResource* webkit_web_view_get_resource(WebKitWebView*, char*);
    134134WebKitWebResource* webkit_web_view_get_main_resource(WebKitWebView*);
Note: See TracChangeset for help on using the changeset viewer.