Changeset 241015 in webkit


Ignore:
Timestamp:
Feb 6, 2019 1:42:49 AM (5 years ago)
Author:
rniwa@webkit.org
Message:

REGRESSION (r240909): Release assert in FrameLoader::loadURL when navigating with a non-existent target name
https://bugs.webkit.org/show_bug.cgi?id=194329

Reviewed by Geoffrey Garen.

Source/WebCore:

The bug was caused by the code path for when navigating with a specific target frame name that does not exist
never setting the load type of PolicyChecker. As a result, we would use whatever load type used in the previous
navigation, resulting in this release assertion.

Updating the load type here should in theory fix the underlying bug r240909 was meant to catch & fix.

Test: fast/loader/navigate-with-new-target-after-back-forward-navigation.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

LayoutTests:

Added a regression test.

  • fast/loader/navigate-with-new-target-after-back-forward-navigation-expected.txt: Added.
  • fast/loader/navigate-with-new-target-after-back-forward-navigation.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r241011 r241015  
     12019-02-05  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION (r240909): Release assert in FrameLoader::loadURL when navigating with a non-existent target name
     4        https://bugs.webkit.org/show_bug.cgi?id=194329
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Added a regression test.
     9
     10        * fast/loader/navigate-with-new-target-after-back-forward-navigation-expected.txt: Added.
     11        * fast/loader/navigate-with-new-target-after-back-forward-navigation.html: Added.
     12
    1132019-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
    214
  • trunk/LayoutTests/TestExpectations

    r240962 r241015  
    66# Platform-specific tests. Skipped here, then re-enabled on the appropriate platform.
    77#//////////////////////////////////////////////////////////////////////////////////////////
     8
     9webgl [ Skip ]
    810
    911compositing/ios [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r241012 r241015  
     12019-02-05  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION (r240909): Release assert in FrameLoader::loadURL when navigating with a non-existent target name
     4        https://bugs.webkit.org/show_bug.cgi?id=194329
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        The bug was caused by the code path for when navigating with a specific target frame name that does not exist
     9        never setting the load type of PolicyChecker. As a result, we would use whatever load type used in the previous
     10        navigation, resulting in this release assertion.
     11
     12        Updating the load type here should in theory fix the underlying bug r240909 was meant to catch & fix.
     13
     14        Test: fast/loader/navigate-with-new-target-after-back-forward-navigation.html
     15
     16        * loader/FrameLoader.cpp:
     17        (WebCore::FrameLoader::loadURL):
     18
    1192019-02-05  Claudio Saavedra  <csaavedra@igalia.com>
    220
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r240909 r241015  
    13801380    if (!targetFrame && !effectiveFrameName.isEmpty()) {
    13811381        action = action.copyWithShouldOpenExternalURLsPolicy(shouldOpenExternalURLsPolicyToApply(m_frame, frameLoadRequest));
     1382        policyChecker().setLoadType(newLoadType);
    13821383        RELEASE_ASSERT(!isBackForwardLoadType(policyChecker().loadType()));
    13831384        policyChecker().checkNewWindowPolicy(WTFMove(action), WTFMove(request), WTFMove(formState), effectiveFrameName, [this, allowNavigationToInvalidURL, openerPolicy, completionHandler = completionHandlerCaller.release()] (const ResourceRequest& request, WeakPtr<FormState>&& formState, const String& frameName, const NavigationAction& action, ShouldContinue shouldContinue) mutable {
Note: See TracChangeset for help on using the changeset viewer.