Bug 232068

Summary: StreamConnectionWorkQueue is not thread-safe
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebKit2Assignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: kkinnunen, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=231970
Bug Depends on:    
Bug Blocks: 231970    
Attachments:
Description Flags
Patch none

Description Kimmo Kinnunen 2021-10-21 01:23:40 PDT
StreamConnectionWorkQueue is not thread-safe

It should be since RemoteRenderingBackend/RemoteDisplayListRecorder implementation is running on it and they add receivers.
Comment 1 Kimmo Kinnunen 2021-10-21 01:35:29 PDT
Created attachment 441995 [details]
Patch
Comment 2 Wenson Hsieh 2021-10-21 08:43:10 PDT
Comment on attachment 441995 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=441995&action=review

> Source/WebKit/Platform/IPC/StreamConnectionWorkQueue.cpp:38
> +    // `StreamConnectionWorkQueue::stop()` should be called if anything has been dispatched or listened to.

Should this also assert `m_shouldQuit`?
Comment 3 Kimmo Kinnunen 2021-10-22 00:50:35 PDT
(In reply to Wenson Hsieh from comment #2)
> Should this also assert `m_shouldQuit`?

No, it's ok to create the work queue and never start it and then destroy.
Comment 4 EWS 2021-10-22 01:18:24 PDT
Committed r284671 (243391@main): <https://commits.webkit.org/243391@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 441995 [details].
Comment 5 Radar WebKit Bug Importer 2021-10-22 01:19:14 PDT
<rdar://problem/84540490>