Changeset 246174 in webkit
- Timestamp:
- Jun 6, 2019 4:00:05 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r246167 r246174 1 2019-06-06 Geoffrey Garen <ggaren@apple.com> 2 3 Crash using WKHTTPCookieStore when you use WKWebView and UIWebView in the same app 4 https://bugs.webkit.org/show_bug.cgi?id=198622 5 6 Reviewed by Chris Dumez. 7 8 Today in a WWDC lab, I saw some crash reports from an app that mixed 9 WKWebView and UIWebView. The proximate cause of the crash is that 10 WKHTTPCookieStore queues a callOnMainThread function, and then 11 UIWebView dequeues it on the WebThread. 12 13 No test because this crash depends on mixing WKWebView and UIWebView and 14 getting (un)lucky on the timing. 15 16 * UIProcess/API/APIHTTPCookieStore.cpp: 17 (API::HTTPCookieStore::cookies): 18 (API::HTTPCookieStore::setCookies): 19 (API::HTTPCookieStore::deleteCookie): Avoid using callOnMainThread 20 becuase it is prohibited in the UI process. 21 1 22 2019-06-06 Antoine Quint <graouts@apple.com> 2 23 -
trunk/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp
r241903 r246174 63 63 allCookies.appendVector(m_owningDataStore->pendingCookies()); 64 64 65 callOnMainThread([completionHandler = WTFMove(completionHandler), allCookies] () mutable {65 RunLoop::main().dispatch([completionHandler = WTFMove(completionHandler), allCookies] () mutable { 66 66 completionHandler(allCookies); 67 67 }); … … 87 87 } 88 88 89 callOnMainThread(WTFMove(completionHandler));89 RunLoop::main().dispatch(WTFMove(completionHandler)); 90 90 return; 91 91 } … … 106 106 m_owningDataStore->removePendingCookie(cookie); 107 107 108 callOnMainThread([completionHandler = WTFMove(completionHandler)] () mutable {108 RunLoop::main().dispatch([completionHandler = WTFMove(completionHandler)] () mutable { 109 109 completionHandler(); 110 110 });
Note: See TracChangeset
for help on using the changeset viewer.