RESOLVED FIXED232670
_pasteboardWithName should be thread-safe
https://bugs.webkit.org/show_bug.cgi?id=232670
Summary _pasteboardWithName should be thread-safe
Chris Dumez
Reported 2021-11-03 10:37:56 PDT
_pasteboardWithName should be thread-safe, to match [NSPasteboard _pasteboardWithName]. This could lead to flaky crashes like so: Thread 7 Crashed:: Dispatch queue: com.apple.root.user-initiated-qos 0 CoreFoundation 0x7ff810d9fb12 -[__NSDictionaryM setObject:forKey:] + 428 1 WebKitTestRunner 0x10baa0c66 +[WebKitTestRunnerPasteboard _pasteboardWithName:] + 374 (WebKitTestRunnerPasteboard.mm:63) 2 ShareKit 0x7ff91ded5888 -[NSObject(ShareKitExtension) shareItemURL] + 240 3 ShareKit 0x7ff91ded56d9 +[SHKSandbox filteredItemsFromSingleItem:processWithPID:] + 79 4 ShareKit 0x7ff91ded54b7 +[SHKSandbox filteredItemsFromItems:processWithPID:] + 469 5 ShareKit 0x7ff91ded5290 +[SHKSharingService sandboxProofItemsFromItems:] + 318 6 ShareKit 0x7ff91df03861 __102+[SHKSharingService sharingServicesOnMainQueueForItems:mask:invokedByPicker:allowInactive:completion:]_block_invoke + 42 7 libdispatch.dylib 0x7ff810b63ad8 _dispatch_call_block_and_release + 12 8 libdispatch.dylib 0x7ff810b64cc9 _dispatch_client_callout + 8 9 libdispatch.dylib 0x7ff810b7450b _dispatch_root_queue_drain + 680 10 libdispatch.dylib 0x7ff810b74b5a _dispatch_worker_thread2 + 160 11 libsystem_pthread.dylib 0x7ff810d1802e _pthread_wqthread + 256 12 libsystem_pthread.dylib 0x7ff810d16ffb start_wqthread + 15
Attachments
Patch (5.58 KB, patch)
2021-11-03 10:42 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-11-03 10:42:07 PDT
EWS
Comment 2 2021-11-03 13:12:30 PDT
Committed r285222 (243847@main): <https://commits.webkit.org/243847@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 443210 [details].
Radar WebKit Bug Importer
Comment 3 2021-11-03 13:13:20 PDT
Note You need to log in before you can comment on or make changes to this bug.