Changeset 228716 in webkit
- Timestamp:
- Feb 19, 2018 4:20:53 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r228715 r228716 1 2018-02-19 Chris Dumez <cdumez@apple.com> 2 3 Crash under MIMETypeRegistry::isSupportedJavaScriptMIMEType() 4 https://bugs.webkit.org/show_bug.cgi?id=182927 5 <rdar://problem/37675748> 6 7 Reviewed by Antti Koivisto. 8 9 Make it safe to call MIMETypeRegistry::isSupportedJavaScriptMIMEType() from the non-main thread. 10 It is currently being called from a background thread in the following places: 11 - ServiceWorkerJob::didReceiveResponse() 12 - WorkerGlobalScope::importScripts() 13 14 These call sites on non-main threads were added recently with the support for service workers. 15 16 No new tests, already covered by existing tests that flakily experience service worker 17 process crashes. 18 19 * platform/MIMETypeRegistry.cpp: 20 (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): 21 1 22 2018-02-19 Dean Jackson <dino@apple.com> 2 23 -
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
r227631 r228716 493 493 if (mimeType.isEmpty()) 494 494 return false; 495 496 if (!isMainThread()) { 497 bool isSupported = false; 498 callOnMainThreadAndWait([&isSupported, mimeType = mimeType.isolatedCopy()] { 499 isSupported = isSupportedJavaScriptMIMEType(mimeType); 500 }); 501 return isSupported; 502 } 503 495 504 if (!supportedJavaScriptMIMETypes) 496 505 initializeSupportedNonImageMimeTypes();
Note: See TracChangeset
for help on using the changeset viewer.