| Summary: | Stop using UncheckedLock in WTF::AutomaticThread | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||||
| Component: | Web Template Framework | Assignee: | Chris Dumez <cdumez> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | achristensen, benjamin, cmarcelo, darin, ddkilzer, ews-watchlist, ggaren, keith_miller, mark.lam, msaboff, saam, sam, tzagallo, webkit-bug-importer | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Chris Dumez
2021-05-25 19:35:23 PDT
Created attachment 429725 [details]
Patch
Created attachment 429726 [details]
Patch
Created attachment 429727 [details]
Patch
Comment on attachment 429727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429727&action=review > Source/WTF/wtf/ParallelHelperPool.cpp:189 > + assertIsHeld(*m_pool.m_lock); Why not just annotate the poll function? Or does this only work for locks that are a member of the same class as the method? Comment on attachment 429727 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429727&action=review >> Source/WTF/wtf/ParallelHelperPool.cpp:189 >> + assertIsHeld(*m_pool.m_lock); > > Why not just annotate the poll function? Or does this only work for locks that are a member of the same class as the method? I'll try. I think I already tried that and it didn't work but I don't really remember why. Created attachment 429759 [details]
Patch
(In reply to Keith Miller from comment #4) > Comment on attachment 429727 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=429727&action=review > > > Source/WTF/wtf/ParallelHelperPool.cpp:189 > > + assertIsHeld(*m_pool.m_lock); > > Why not just annotate the poll function? Or does this only work for locks > that are a member of the same class as the method? Looks like it builds without the assertIsHeld() and the annotation. Made the change. (In reply to Chris Dumez from comment #7) > (In reply to Keith Miller from comment #4) > > Comment on attachment 429727 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=429727&action=review > > > > > Source/WTF/wtf/ParallelHelperPool.cpp:189 > > > + assertIsHeld(*m_pool.m_lock); > > > > Why not just annotate the poll function? Or does this only work for locks > > that are a member of the same class as the method? > > Looks like it builds without the assertIsHeld() and the annotation. Made the > change. Interesting, I'm surprised it's able to prove that no function changes the m_pool ref. Or maybe it makes the assumption that those values are constant? I guess the same thing would apply to the Box<Lock> that we pass to the AtomaticThread too. Created attachment 429767 [details]
Patch
Comment on attachment 429767 [details] Patch Clearing flags on attachment: 429767 Committed r278087 (238164@main): <https://commits.webkit.org/238164@main> All reviewed patches have been landed. Closing bug. |