Bug 232068 - StreamConnectionWorkQueue is not thread-safe
Summary: StreamConnectionWorkQueue is not thread-safe
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kimmo Kinnunen
URL:
Keywords: InRadar
Depends on:
Blocks: 231970
  Show dependency treegraph
 
Reported: 2021-10-21 01:23 PDT by Kimmo Kinnunen
Modified: 2021-10-22 01:19 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.00 KB, patch)
2021-10-21 01:35 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>