Bug 232070 - StreamConnectionWorkQueue::processStreams() has a incorrect protection ref
Summary: StreamConnectionWorkQueue::processStreams() has a incorrect protection ref
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:
 
Reported: 2021-10-21 01:40 PDT by Kimmo Kinnunen
Modified: 2021-10-22 07:39 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.12 KB, patch)
2021-10-21 01:51 PDT, Kimmo Kinnunen
no flags Details | Formatted Diff | Diff
Patch for landing (4.74 KB, patch)
2021-10-22 01:53 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:40:33 PDT
`StreamConnectionWorkQueue::processStreams()` has a incorrect protection ref

The `processStreams()` runs in the work queue thread.
It cannot hold the last ref of itself, as that would mean that it would destroy itself in the thread it runs.
This is not possible.
Comment 1 Kimmo Kinnunen 2021-10-21 01:51:34 PDT
Created attachment 441997 [details]
Patch
Comment 2 Wenson Hsieh 2021-10-21 08:27:16 PDT
Comment on attachment 441997 [details]
Patch

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

> Source/WebKit/ChangeLog:12
> +        task, and since `stop()` waits until queue has executed the

In that case, I think we should consider renaming `stop()` to `stopAndWaitForTasksToComplete()`, to make it clear that it must always block on the work queue thread.
Comment 3 Kimmo Kinnunen 2021-10-22 01:53:13 PDT
Created attachment 442134 [details]
Patch for landing
Comment 4 Kimmo Kinnunen 2021-10-22 07:02:55 PDT
(In reply to Wenson Hsieh from comment #2)
> Comment on attachment 441997 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=441997&action=review
> 
> > Source/WebKit/ChangeLog:12
> > +        task, and since `stop()` waits until queue has executed the
> 
> In that case, I think we should consider renaming `stop()` to
> `stopAndWaitForTasksToComplete()`, to make it clear that it must always
> block on the work queue thread.

Thanks, added it as stopAndWaitForCompletion to use same naming as Thread
Comment 5 EWS 2021-10-22 07:38:49 PDT
Committed r284681 (243401@main): <https://commits.webkit.org/243401@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442134 [details].
Comment 6 Radar WebKit Bug Importer 2021-10-22 07:39:14 PDT
<rdar://problem/84549004>