WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226432
Drop UncheckedCondition / UncheckedLock
https://bugs.webkit.org/show_bug.cgi?id=226432
Summary
Drop UncheckedCondition / UncheckedLock
Chris Dumez
Reported
2021-05-29 20:17:59 PDT
Drop UncheckedCondition / UncheckedLock now that they are unused.
Attachments
Patch
(18.66 KB, patch)
2021-05-30 11:12 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(18.21 KB, patch)
2021-05-30 11:56 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2021-05-30 11:12:18 PDT
Created
attachment 430137
[details]
Patch
Darin Adler
Comment 2
2021-05-30 11:40:13 PDT
Comment on
attachment 430137
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=430137&action=review
> Source/WTF/wtf/Lock.h:146 > +template<typename LockType> inline void assertIsHeld(const LockType& lock) { ASSERT_UNUSED(lock, lock.isLocked()); }
Why is this template needed? What classes is this used on besides Lock? Is a template the best way to do this, or would simple overloading be better?
Chris Dumez
Comment 3
2021-05-30 11:43:43 PDT
Comment on
attachment 430137
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=430137&action=review
> Source/WTF/wtf/Condition.h:201 > + assertIsHeld(lock);
I had to add an assertIsHeld() here to make clang happy (even though I already marked the whole function as WTF_IGNORES_THREAD_SAFETY_ANALYSIS). I am not sure why but anyway. WTF::Condition is templated and supposed to work with all kind of locks (RecursiveLock comes to mind but this is not limited AFAIK). As a result, I had to add a templated assertIsHeld() so that this would build no matter what lock type the condition is used with.
Chris Dumez
Comment 4
2021-05-30 11:53:07 PDT
(In reply to Chris Dumez from
comment #3
)
> Comment on
attachment 430137
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=430137&action=review
> > > Source/WTF/wtf/Condition.h:201 > > + assertIsHeld(lock); > > I had to add an assertIsHeld() here to make clang happy (even though I > already marked the whole function as WTF_IGNORES_THREAD_SAFETY_ANALYSIS). I > am not sure why but anyway. WTF::Condition is templated and supposed to work > with all kind of locks (RecursiveLock comes to mind but this is not limited > AFAIK). > As a result, I had to add a templated assertIsHeld() so that this would > build no matter what lock type the condition is used with.
Oh, based on something I just saw online, I may be able to add WTF_IGNORES_THREAD_SAFETY_ANALYSIS on the lambda. Let me try that. If that works, then I wouldn't need this new templated assertIsHeld at all.
Chris Dumez
Comment 5
2021-05-30 11:56:12 PDT
Created
attachment 430140
[details]
Patch
EWS
Comment 6
2021-05-30 13:36:06 PDT
Committed
r278257
(
238294@main
): <
https://commits.webkit.org/238294@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 430140
[details]
.
Radar WebKit Bug Importer
Comment 7
2021-05-30 13:37:17 PDT
<
rdar://problem/78667488
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug