-
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.
Annotate some main-thread-only classes and protocols in WebKit API
https://bugs.webkit.org/show_bug.cgi?id=273798 rdar://127629908 Reviewed by Brady Eidson. Most WebKit APIs are main-thread-only so let's say so for better ergonomics and error checking for clients. I manually tested these classes: WKBackForwardList WKBackForwardListItem WKWebViewConfiguration WKUserContentController WKContentRuleList WKContentRuleListStore WKContentWorld WKContextMenuElementInfo WKDownload WKFindConfiguration WKFindResult WKFrameInfo WKHTTPCookieStore WKNavigation WKNavigationAction WKNavigationResponse WKPreferences WKProcessPool WKScriptMessage WKWebsiteDataStore WKOpenPanelParameters WKPDFConfiguration WKSecurityOrigin WKSnapshotConfiguration WKUserScript WKWebpagePreferences WKWebsiteDataRecord WKWebView WKWindowFeatures ...and these callback-to-WebKit APIs: WKDownloadDelegate - decideDestinationUsingResponse - willPerformHTTPRedirection - didReceiveAuthenticationChallenge WKUIDelegate - runJavaScriptAlertPanelWithMessage - runJavaScriptConfirmPanelWithMessage - runJavaScriptTextInputPanelWithPrompt - requestMediaCapturePermissionForOrigin - requestDeviceOrientationAndMotionPermissionForOrigin - contextMenuConfigurationForElement - showLockdownModeFirstUseMessage - runOpenPanelWithParameters WKScriptMessageHandlerWithReply - didReceiveScriptMessage ...and verified that they compile when used in "isolated" (i.e. main thread) code and fail to compile when used in "nonisolated" (i.e. secondary thread) code. I manually tested these protocols: WKHTTPCookieStoreObserver WKUIDelegate WKURLSchemeHandler WKScriptMessageHandler WKScriptMessageHandlerWithReply WKDownloadDelegate WKNavigationDelegate ...and these callback-to-client APIs: WKContentRuleListStore - compileContentRuleListForIdentifier - lookUpContentRuleListForIdentifier - removeContentRuleListForIdentifier - getAvailableContentRuleListIdentifiers WKDownload - cancel WKHTTPCookieStore - getAllCookies - setCookie - deleteCookie - setCookiePolicy - getCookiePolicy WKWebsiteDataStore - fetchDataRecordsOfTypes - removeDataOfTypes - removeDataOfTypes - removeDataStoreForIdentifier - fetchAllDataStoreIdentifiers * WKWebView.h - evaluateJavaScript - evaluateJavaScript - callAsyncJavaScript - closeAllMediaPresentationsWithCompletionHandler - pauseAllMediaPlaybackWithCompletionHandler - setAllMediaPlaybackSuspended - requestMediaPlaybackStateWithCompletionHandler - setCameraCaptureState - setMicrophoneCaptureState - takeSnapshotWithConfiguration - createPDFWithConfiguration - createWebArchiveDataWithCompletionHandler - findString - startDownloadUsingRequest - resumeDownloadFromResumeData ...and verified that they compile when implemented in "isolated" (i.e. main thread) code. These classes are thread safe and need no annotation: WKURLSchemeTask Canonical link: https://commits.webkit.org/278930@main
- Loading branch information
1 parent
a57fafd
commit 13873b2
Showing
36 changed files
with
90 additions
and
48 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
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
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
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
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
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
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
Oops, something went wrong.
13873b2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this! I was about to file a bug after running into issues with WebKit compiling with Swift 6 on the Xcode beta.