-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DNR content rule list notifications aren't being delivered to the cor…
…rect extension https://bugs.webkit.org/show_bug.cgi?id=266099 <rdar://problem/119397749> Reviewed by Timothy Hatcher. When notifying an extension that a DNR rule was matched (for getMatchedRules or setExtensionActionOptions), we need a way to match the content rule list notification to the extension. After the change of the name of the content rule list to be the same across all extensions, there was no way to do this anymore. It's a bit silly to require the unique name of the extension in an already unique directory, but ContentRuleListResults only has the identifier of the content rule list that performed the action, not the store it came from. While I'm here, a few more changes were made: 1) Clear out some DNR ivars when an extension context is unloaded 2) Enhance the DynamicRules test to unload and reload the extension context, and verify that the rules are still loaded and applied upon unload/reload of the context. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::unload): (WebKit::WebExtensionContext::addDeclarativeNetRequestRulesToPrivateUserContentControllers): (WebKit::WebExtensionContext::compileDeclarativeNetRequestRules): (WebKit::WebExtensionContext::loadDeclarativeNetRequestRules): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIDeclarativeNetRequest.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/271762@main
- Loading branch information
1 parent
7b6ea01
commit b094502
Showing
3 changed files
with
41 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters