Bug 211010

Summary: Use static initialized Lock instead of LazyNeverDestroyed<Lock>
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dino, esprehn+autocc, ews-watchlist, graouts, gyuyoung.kim, kondapallykalyan, mark.lam, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mark.lam: review+

Description Yusuke Suzuki 2020-04-24 23:00:16 PDT
Use static initialized Lock instead of LazyNeverDestroyed<Lock>
Comment 1 Yusuke Suzuki 2020-04-24 23:01:09 PDT
Created attachment 397543 [details]
Patch
Comment 2 Mark Lam 2020-04-24 23:05:38 PDT
Comment on attachment 397543 [details]
Patch

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

r=me

> Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:110
> +static Lock deviceMutex;

Why not just declare it as a static inside its accessor function?  Ditto below.
Comment 3 Yusuke Suzuki 2020-04-25 17:16:47 PDT
Comment on attachment 397543 [details]
Patch

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

Thanks!

>> Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:110
>> +static Lock deviceMutex;
> 
> Why not just declare it as a static inside its accessor function?  Ditto below.

Yeah, right. We can put it in a function. Fixed!
Comment 4 Yusuke Suzuki 2020-04-25 17:32:04 PDT
Committed r260714: <https://trac.webkit.org/changeset/260714>
Comment 5 Radar WebKit Bug Importer 2020-04-25 17:33:14 PDT
<rdar://problem/62378157>