Title: [249280] trunk/Source/WTF
Revision
249280
Author
[email protected]
Date
2019-08-29 10:11:05 -0700 (Thu, 29 Aug 2019)

Log Message

CompletionHandler default constructor does not initialize `m_wasConstructedOnMainThread`
https://bugs.webkit.org/show_bug.cgi?id=201249

Reviewed by Joseph Pecoraro and Alex Christensen.

* wtf/CompletionHandler.h:
(WTF::CompletionHandler<Out):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (249279 => 249280)


--- trunk/Source/WTF/ChangeLog	2019-08-29 17:04:07 UTC (rev 249279)
+++ trunk/Source/WTF/ChangeLog	2019-08-29 17:11:05 UTC (rev 249280)
@@ -1,5 +1,15 @@
 2019-08-29  Chris Dumez  <[email protected]>
 
+        CompletionHandler default constructor does not initialize `m_wasConstructedOnMainThread`
+        https://bugs.webkit.org/show_bug.cgi?id=201249
+
+        Reviewed by Joseph Pecoraro and Alex Christensen.
+
+        * wtf/CompletionHandler.h:
+        (WTF::CompletionHandler<Out):
+
+2019-08-29  Chris Dumez  <[email protected]>
+
         Crash when mach_port_deallocate() returns KERN_INVALID_NAME
         https://bugs.webkit.org/show_bug.cgi?id=201248
         <rdar://problem/54813890>

Modified: trunk/Source/WTF/wtf/CompletionHandler.h (249279 => 249280)


--- trunk/Source/WTF/wtf/CompletionHandler.h	2019-08-29 17:04:07 UTC (rev 249279)
+++ trunk/Source/WTF/wtf/CompletionHandler.h	2019-08-29 17:11:05 UTC (rev 249280)
@@ -42,9 +42,6 @@
     template<typename CallableType, class = typename std::enable_if<std::is_rvalue_reference<CallableType&&>::value>::type>
     CompletionHandler(CallableType&& callable)
         : m_function(WTFMove(callable))
-#if !ASSERT_DISABLED
-        , m_wasConstructedOnMainThread(isMainThread())
-#endif
     {
     }
 
@@ -68,7 +65,7 @@
 private:
     Function<Out(In...)> m_function;
 #if !ASSERT_DISABLED
-    bool m_wasConstructedOnMainThread;
+    bool m_wasConstructedOnMainThread { isMainThread() };
 #endif
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to