Bug 196922 - [WTF] holdLock should be marked WARN_UNUSED_RETURN
Summary: [WTF] holdLock should be marked WARN_UNUSED_RETURN
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robin Morisset
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-15 11:40 PDT by Robin Morisset
Modified: 2019-04-16 12:51 PDT (History)
11 users (show)

See Also:


Attachments
Patch (3.55 KB, patch)
2019-04-15 11:43 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff
Patch (3.45 KB, patch)
2019-04-15 16:27 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>