[Webkit-unassigned] [Bug 238871] Multiple uses of ThreadSafeRefCounted and CanMakeWeakPtr with non-thread-safe WeakPtr

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 15 05:26:09 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=238871

--- Comment #14 from youenn fablet <youennf at gmail.com> ---
(In reply to Kimmo Kinnunen from comment #13)
> > The general case does not seem too bad to me, you cannot use WeakPtr except in the right thread.
> 
> No, this is incorrect.
> You cannot use WeakPtr in *any* thread, if the object has been reffed in
> another thread.
> This is the kind of problem why it shouldn't exist. Developers do not know
> what is correct and what is not.

It depends on the definition of the right thread.
In any case, I agree this is not easy to reason about and there have been identified issues in our code base.

As I said earlier, I would go with either fixing the combo or outlawing it.
Outlawing it might be easier.
I personally plan to remove this combo in code I am working on (time permitting).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221115/6ab674bd/attachment.htm>


More information about the webkit-unassigned mailing list