Bug 180572 - Use StaticLock and Lock instead of Mutex in Windows WebKitLegacy
Summary: Use StaticLock and Lock instead of Mutex in Windows WebKitLegacy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-07 22:21 PST by Yusuke Suzuki
Modified: 2017-12-08 04:32 PST (History)
9 users (show)

See Also:


Attachments
Patch (18.79 KB, patch)
2017-12-07 22:25 PST, Yusuke Suzuki
mark.lam: review+
Details | Formatted Diff | Diff
Patch (19.23 KB, patch)
2017-12-07 23:27 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (19.86 KB, patch)
2017-12-08 00:53 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (19.87 KB, patch)
2017-12-08 01:53 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch for landing (19.87 KB, patch)
2017-12-08 02:39 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2017-12-07 22:21:53 PST
Use StaticLock and Lock instead of Mutex in Windows WebKitLegacy
Comment 1 Yusuke Suzuki 2017-12-07 22:25:30 PST
Created attachment 328790 [details]
Patch
Comment 2 Mark Lam 2017-12-07 22:37:19 PST
Comment on attachment 328790 [details]
Patch

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

r=me

> Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp:52
> +        ASSERT_WITH_MESSAGE(!const_cast<Lock&>(m_lock).tryLock(), "CAView::Handle's mutex must be held when calling this function");

Consider changing "mutex" to "lock".

> Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp:58
> +        ASSERT_WITH_MESSAGE(!m_lock.tryLock(), "CAView::Handle's mutex must be held when calling this function");

Consider changing "mutex" to "lock".
Comment 3 Yusuke Suzuki 2017-12-07 23:27:16 PST
Created attachment 328795 [details]
Patch

Fix build failure
Comment 4 Yusuke Suzuki 2017-12-08 00:25:19 PST
Comment on attachment 328790 [details]
Patch

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

Thanks!

>> Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp:52
>> +        ASSERT_WITH_MESSAGE(!const_cast<Lock&>(m_lock).tryLock(), "CAView::Handle's mutex must be held when calling this function");
> 
> Consider changing "mutex" to "lock".

Fixed.

>> Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp:58
>> +        ASSERT_WITH_MESSAGE(!m_lock.tryLock(), "CAView::Handle's mutex must be held when calling this function");
> 
> Consider changing "mutex" to "lock".

Fixed.
Comment 5 Yusuke Suzuki 2017-12-08 00:53:29 PST
Created attachment 328797 [details]
Patch

Fix build failure
Comment 6 EWS Watchlist 2017-12-08 00:55:57 PST
Attachment 328797 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp:120:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Yusuke Suzuki 2017-12-08 01:53:52 PST
Created attachment 328799 [details]
Patch

Fix build failure
Comment 8 EWS Watchlist 2017-12-08 01:55:24 PST
Attachment 328799 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp:120:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Yusuke Suzuki 2017-12-08 02:39:56 PST
Created attachment 328802 [details]
Patch for landing

Patch for landing
Comment 10 EWS Watchlist 2017-12-08 02:41:59 PST
Attachment 328802 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/win/WebKitQuartzCoreAdditions/CAView.cpp:120:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 WebKit Commit Bot 2017-12-08 04:09:34 PST
Comment on attachment 328802 [details]
Patch for landing

Clearing flags on attachment: 328802

Committed r225672: <https://trac.webkit.org/changeset/225672>
Comment 12 Radar WebKit Bug Importer 2017-12-08 04:32:33 PST
<rdar://problem/35932629>