[webkit-changes] [WebKit/WebKit] 7b10b1: MessageEvent::m_data lock is not held when accessed
Kimmo Kinnunen
noreply at github.com
Mon Jul 3 12:41:38 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7b10b122b14d51717dd736bff4dcb6fa64545a2c
https://github.com/WebKit/WebKit/commit/7b10b122b14d51717dd736bff4dcb6fa64545a2c
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-07-03 (Mon, 03 Jul 2023)
Changed paths:
M Source/WTF/wtf/Locker.h
M Source/WebCore/dom/MessageEvent.cpp
M Source/WebCore/dom/MessageEvent.h
Log Message:
-----------
MessageEvent::m_data lock is not held when accessed
https://bugs.webkit.org/show_bug.cgi?id=258806
rdar://111681401
Reviewed by Yusuke Suzuki.
The unnamed Locker instance is discarded, releasing the lock.
Fix by naming the instance.
Add declarations to prevent similar bugs.
* Source/WTF/wtf/Locker.h:
(WTF::Locker::Locker): Deleted.
(WTF::Locker::~Locker): Deleted.
(WTF::Locker::tryLock): Deleted.
(WTF::Locker::lockable): Deleted.
(WTF::Locker::operator bool const): Deleted.
(WTF::Locker::unlockEarly): Deleted.
(WTF::Locker::operator=): Deleted.
(WTF::Locker::unlock): Deleted.
(WTF::Locker::lock): Deleted.
* Source/WebCore/dom/MessageEvent.cpp:
(WebCore::MessageEvent::initMessageEvent):
(WebCore::MessageEvent::memoryCost const):
* Source/WebCore/dom/MessageEvent.h:
Canonical link: https://commits.webkit.org/265732@main
More information about the webkit-changes
mailing list