[webkit-changes] [WebKit/WebKit] 99afca: Don't crash WebContent process when passing invali...

EWS noreply at github.com
Thu Jan 19 09:49:07 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99afca995277e6c9ac1e2e68ccfc133b4d99fc3d
      https://github.com/WebKit/WebKit/commit/99afca995277e6c9ac1e2e68ccfc133b4d99fc3d
  Author: Chirag M Shah <chirags2793 at gmail.com>
  Date:   2023-01-19 (Thu, 19 Jan 2023)

  Changed paths:
    A LayoutTests/http/tests/cache-storage/cache-match-invalid-url-expected.txt
    A LayoutTests/http/tests/cache-storage/cache-match-invalid-url.html
    M Source/WebCore/Modules/cache/DOMCache.cpp
    M Source/WebCore/Modules/cache/DOMCache.h

  Log Message:
  -----------
  Don't crash WebContent process when passing invalid URL for cache
https://bugs.webkit.org/show_bug.cgi?id=250727
rdar://104294986

Reviewed by Chris Dumez and Sihui Liu.

Before this change, if FetchRequest::create() returned an exception, we
never used to check for that and call releaseReturnValue() on that which
would cause a crash. This change fixes that, so that we can correctly
return the "URL is not valid or contains user credentials." exception.
This change also fixes a bug where correct exception wasn't returned.

* LayoutTests/http/tests/cache-storage/cache-match-invalid-url-expected.txt: Added.
* LayoutTests/http/tests/cache-storage/cache-match-invalid-url.html: Added.
* Source/WebCore/Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::doMatch):
(WebCore::DOMCache::matchAll):
(WebCore::DOMCache::requestFromInfo):
* Source/WebCore/Modules/cache/DOMCache.h:

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




More information about the webkit-changes mailing list