Title: [260731] trunk/Source
Revision
260731
Author
[email protected]
Date
2020-04-26 14:17:43 -0700 (Sun, 26 Apr 2020)

Log Message

Use `static Lock` instead of `static NeverDestroyed<Lock>`
https://bugs.webkit.org/show_bug.cgi?id=211036

Reviewed by Darin Adler.

Source/WebCore:

* platform/GenericTaskQueue.cpp:
(WebCore::TaskDispatcher<Timer>::sharedLock):

Source/WTF:

Lock can be static-initialized since it has constexpr constructor. No need to use NeverDestroyed<Lock>.

* wtf/Logger.h:
(WTF::Logger::observerLock):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (260730 => 260731)


--- trunk/Source/WTF/ChangeLog	2020-04-26 21:11:50 UTC (rev 260730)
+++ trunk/Source/WTF/ChangeLog	2020-04-26 21:17:43 UTC (rev 260731)
@@ -1,3 +1,15 @@
+2020-04-26  Yusuke Suzuki  <[email protected]>
+
+        Use `static Lock` instead of `static NeverDestroyed<Lock>`
+        https://bugs.webkit.org/show_bug.cgi?id=211036
+
+        Reviewed by Darin Adler.
+
+        Lock can be static-initialized since it has constexpr constructor. No need to use NeverDestroyed<Lock>.
+
+        * wtf/Logger.h:
+        (WTF::Logger::observerLock):
+
 2020-04-26  Joonghun Park  <[email protected]>
 
         [WTF] Workaround gcc bug for unsigned bitfield related usual arithmetic conversions

Modified: trunk/Source/WTF/wtf/Logger.h (260730 => 260731)


--- trunk/Source/WTF/wtf/Logger.h	2020-04-26 21:11:50 UTC (rev 260730)
+++ trunk/Source/WTF/wtf/Logger.h	2020-04-26 21:17:43 UTC (rev 260731)
@@ -367,7 +367,7 @@
 
     static Lock& observerLock()
     {
-        static NeverDestroyed<Lock> observerLock;
+        static Lock observerLock;
         return observerLock;
     }
 

Modified: trunk/Source/WebCore/ChangeLog (260730 => 260731)


--- trunk/Source/WebCore/ChangeLog	2020-04-26 21:11:50 UTC (rev 260730)
+++ trunk/Source/WebCore/ChangeLog	2020-04-26 21:17:43 UTC (rev 260731)
@@ -1,3 +1,13 @@
+2020-04-26  Yusuke Suzuki  <[email protected]>
+
+        Use `static Lock` instead of `static NeverDestroyed<Lock>`
+        https://bugs.webkit.org/show_bug.cgi?id=211036
+
+        Reviewed by Darin Adler.
+
+        * platform/GenericTaskQueue.cpp:
+        (WebCore::TaskDispatcher<Timer>::sharedLock):
+
 2020-04-26  Peng Liu  <[email protected]>
 
         Remove unused class PlaybackSessionInterface

Modified: trunk/Source/WebCore/platform/GenericTaskQueue.cpp (260730 => 260731)


--- trunk/Source/WebCore/platform/GenericTaskQueue.cpp	2020-04-26 21:11:50 UTC (rev 260730)
+++ trunk/Source/WebCore/platform/GenericTaskQueue.cpp	2020-04-26 21:17:43 UTC (rev 260731)
@@ -63,7 +63,7 @@
 
 Lock& TaskDispatcher<Timer>::sharedLock()
 {
-    static NeverDestroyed<Lock> lock;
+    static Lock lock;
     return lock;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to