-
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.
Safari crashes at WebKit::WebExtensionContext::openInspectors.
https://webkit.org/b/273560 rdar://127189700 Reviewed by Brian Weinstein. Add a null check for _WKInspector befor tryign to get API::Inspector from it. Also moved extensionHasAccess() check to openWindows() and openTabs(), so the caller does not need to do it. A extensionHasAccess() check was missing in the openInspectors() loop of openTabs(). Also skip extra work with early returns for !hasInspectorBackgroundPage(). Finally, adopt WTF::compactMap and WTF::map() more. * Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm: (-[_WKWebExtensionContext openWindows]): Pass IgnoreExtensionAccess::Yes since API should see all. (-[_WKWebExtensionContext openTabs]): Ditto. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPICookiesCocoa.mm: (WebKit::WebExtensionContext::cookiesGetAllCookieStores): * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::openWindows const): (WebKit::WebExtensionContext::openTabs const): (WebKit::WebExtensionContext::openInspectors const): (WebKit::WebExtensionContext::loadedInspectors const): (WebKit::WebExtensionContext::inspectorExtension const): (WebKit::WebExtensionContext::inspector const): (WebKit::WebExtensionContext::processes const): (WebKit::WebExtensionContext::isInspectorBackgroundPage const): (WebKit::WebExtensionContext::isDevToolsMessageAllowed): Removed #ifdef since this method is already guarded by it. * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: Canonical link: https://commits.webkit.org/278239@main
- Loading branch information
Showing
4 changed files
with
47 additions
and
33 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
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