Bug 196922

Summary: [WTF] holdLock should be marked WARN_UNUSED_RETURN
Product: WebKit Reporter: Robin Morisset <rmorisset>
Component: JavaScriptCoreAssignee: Robin Morisset <rmorisset>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, dbates, ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Robin Morisset 2019-04-15 11:40:33 PDT
simply to catch cases where someone forgets to use the proper idiom auto locker = holdLock(lock);
Comment 1 Robin Morisset 2019-04-15 11:43:23 PDT
Created attachment 367434 [details]
Patch
Comment 2 EWS Watchlist 2019-04-15 11:47:21 PDT
Attachment 367434 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/Locker.h:123:  The parameter name "lock" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/Locker.h:131:  The parameter name "lock" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/Locker.h:139:  The parameter name "lock" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 3 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Robin Morisset 2019-04-15 16:27:21 PDT
Created attachment 367476 [details]
Patch

Just fix the trivial style nits.
Comment 4 Keith Miller 2019-04-15 16:53:05 PDT
Comment on attachment 367476 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=367476&action=review

r=me

> Source/JavaScriptCore/heap/BlockDirectory.cpp:66
> +            // FIXME: should we instead do a cheaper thing like a volatile load in the page?

Wow, that’s weird. What’s this function used for?
Comment 5 Robin Morisset 2019-04-16 12:20:06 PDT
(In reply to Keith Miller from comment #4)
> Comment on attachment 367476 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=367476&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/heap/BlockDirectory.cpp:66
> > +            // FIXME: should we instead do a cheaper thing like a volatile load in the page?
> 
> Wow, that’s weird. What’s this function used for?

It is used for cancelling the full GC when any part of the heap is paged out.
Comment 6 WebKit Commit Bot 2019-04-16 12:46:33 PDT
Comment on attachment 367476 [details]
Patch

Clearing flags on attachment: 367476

Committed r244352: <https://trac.webkit.org/changeset/244352>
Comment 7 WebKit Commit Bot 2019-04-16 12:46:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-04-16 12:51:12 PDT
<rdar://problem/49950528>