Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c234d2219797395a7e23f45a681da9878c44f99a
      
https://github.com/WebKit/WebKit/commit/c234d2219797395a7e23f45a681da9878c44f99a
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2023-06-16 (Fri, 16 Jun 2023)

  Changed paths:
    M Source/WTF/wtf/WeakPtr.h

  Log Message:
  -----------
  REGRESSION(264515@main): m_player WeakPtr is accessed from non-main threads
https://bugs.webkit.org/show_bug.cgi?id=258022
rdar://110817538

Reviewed by Youenn Fablet.

Tighten WeakPtr assertion that it can only be accessed on the GC thread
if it was created on the main thread.
We apply the same requirement to operator-> and operator* for consistency.

When the GC thread is running, the main thread is suspended which makes
it safe to use with main thread objects.

* Source/WTF/wtf/WeakPtr.h:
(WTF::WeakPtr::get const):
(WTF::WeakPtr::operator-> const):
(WTF::WeakPtr::operator* const):
(WTF::WeakPtr::canSafelyBeUsed const):

Canonical link: https://commits.webkit.org/265233@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to