[webkit-changes] [WebKit/WebKit] f112de: Speedup WebExtensionMatchPattern::matchesAllHosts(...

Timothy Hatcher noreply at github.com
Fri Mar 10 11:00:18 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f112de95435d52c2c4997cb796247c6691ba2c2b
      https://github.com/WebKit/WebKit/commit/f112de95435d52c2c4997cb796247c6691ba2c2b
  Author: Timothy Hatcher <timothy at apple.com>
  Date:   2023-03-10 (Fri, 10 Mar 2023)

  Changed paths:
    M Source/WebCore/page/UserContentURLPattern.cpp
    M Source/WebCore/page/UserContentURLPattern.h
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionMatchPatternCocoa.mm

  Log Message:
  -----------
  Speedup WebExtensionMatchPattern::matchesAllHosts() to avoid makeString().
https://webkit.org/b/253722
rdar://106052464

Reviewed by Brian Weinstein.

* Source/WebCore/page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::originalHost const): Use matchAllHosts().
* Source/WebCore/page/UserContentURLPattern.h:
(WebCore::UserContentURLPattern::matchAllHosts const): Added.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionMatchPatternCocoa.mm:
(WebKit::WebExtensionMatchPattern::matchesAllHosts const): Use matchAllHosts() instead of host().

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




More information about the webkit-changes mailing list