-
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.
REGRESSION (275819@main): 5 Tests in TestWebKitAPI.WKWebExtensionAPIW…
…ebRequest sometimes timeout (270812). https://webkit.org/b/271392 rdar://124401551 Reviewed by Brian Weinstein. Change from using webView:didFinishNavigation: to _webView:navigationDidFinishDocumentLoad: for tracking when the background page has finished loading. This will properly fire after modules have executed, or any async script elements in a custom background page. This allows us to remove the arbitrary delay we had before, which was wholly inadequate across different machines, and was firing too soon for slow machines. By waiting for the document load, we know any background content event listeners will be registered and can properly dispatch events. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (-[_WKWebExtensionContextDelegate _webView:navigationDidFinishDocumentLoad:]): Added. (WebKit::WebExtensionContext::performTasksAfterBackgroundContentLoads): Removed dispatch_after(). (WebKit::WebExtensionContext::didFinishDocumentLoad): (-[_WKWebExtensionContextDelegate webView:didFinishNavigation:]): Deleted. (WebKit::WebExtensionContext::didFinishNavigation): Deleted. * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: Canonical link: https://commits.webkit.org/276487@main
- Loading branch information
Showing
2 changed files
with
23 additions
and
29 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