Bug 211010 - Use static initialized Lock instead of LazyNeverDestroyed<Lock>
Summary: Use static initialized Lock instead of LazyNeverDestroyed<Lock>
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: 2020-04-24 23:00 PDT by Yusuke Suzuki
Modified: 2020-04-25 17:33 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.29 KB, patch)
2020-04-24 23:01 PDT, Yusuke Suzuki
mark.lam: review+
Details | Formatted Diff | Diff

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