Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 40c78192b01e6da5546b5ef53f6fa347fa1e2cd7
      
https://github.com/WebKit/WebKit/commit/40c78192b01e6da5546b5ef53f6fa347fa1e2cd7
  Author: Jeff Miller <[email protected]>
  Date:   2023-02-16 (Thu, 16 Feb 2023)

  Changed paths:
    M Source/WebCore/loader/cache/MemoryCache.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  Assertion failure when calling WKBundlePageHasLocalDataForURL() with a URL 
that contains a fragment identifier
https://bugs.webkit.org/show_bug.cgi?id=252356
rdar://105518815

Reviewed by Wenson Hsieh.

WKBundlePageHasLocalDataForURL() is the only caller of 
WebPage::hasLocalDataForURL(), which calls
DocumentLoader::subresource() with the URL. That function only expects URLs 
without fragment
identifiers, so remove any identifier first in WebPage::hasLocalDataForURL().

* Source/WebCore/loader/cache/MemoryCache.h:
Export MemoryCache::removeFragmentIdentifierIfNeeded() so it can be used from 
WebKit.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::hasLocalDataForURL):
Remove any fragment identifier from the URL before passing it to 
DocumentLoader::subresource().

Canonical link: https://commits.webkit.org/260371@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to