Title: [250228] releases/WebKitGTK/webkit-2.26/Source/WTF
- Revision
- 250228
- Author
- carlo...@webkit.org
- Date
- 2019-09-23 03:40:37 -0700 (Mon, 23 Sep 2019)
Log Message
Merge r250126 - UI process crash when using callOnMainThread() after the main thread dispatcher has been destroyed
https://bugs.webkit.org/show_bug.cgi?id=197266
Patch by Libor Bukata <libor.buk...@oracle.com> on 2019-09-20
Reviewed by Carlos Garcia Campos.
* wtf/generic/MainThreadGeneric.cpp:
(WTF::scheduleDispatchFunctionsOnMainThread):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.26/Source/WTF/ChangeLog (250227 => 250228)
--- releases/WebKitGTK/webkit-2.26/Source/WTF/ChangeLog 2019-09-23 10:31:24 UTC (rev 250227)
+++ releases/WebKitGTK/webkit-2.26/Source/WTF/ChangeLog 2019-09-23 10:40:37 UTC (rev 250228)
@@ -1,3 +1,13 @@
+2019-09-20 Libor Bukata <libor.buk...@oracle.com>
+
+ UI process crash when using callOnMainThread() after the main thread dispatcher has been destroyed
+ https://bugs.webkit.org/show_bug.cgi?id=197266
+
+ Reviewed by Carlos Garcia Campos.
+
+ * wtf/generic/MainThreadGeneric.cpp:
+ (WTF::scheduleDispatchFunctionsOnMainThread):
+
2019-08-29 Chris Dumez <cdu...@apple.com>
CompletionHandler default constructor does not initialize `m_wasConstructedOnMainThread`
Modified: releases/WebKitGTK/webkit-2.26/Source/WTF/wtf/generic/MainThreadGeneric.cpp (250227 => 250228)
--- releases/WebKitGTK/webkit-2.26/Source/WTF/wtf/generic/MainThreadGeneric.cpp 2019-09-23 10:31:24 UTC (rev 250227)
+++ releases/WebKitGTK/webkit-2.26/Source/WTF/wtf/generic/MainThreadGeneric.cpp 2019-09-23 10:40:37 UTC (rev 250228)
@@ -3,6 +3,7 @@
* Copyright (C) 2007 Justin Haygood (jhayg...@reaktix.com)
* Copyright (C) 2016 Konstantin Tokavev <annu...@yandex.ru>
* Copyright (C) 2016 Yusuke Suzuki <utatane....@gmail.com>
+ * Copyright (C) 2019 Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -36,6 +37,7 @@
#endif
#include <wtf/RunLoop.h>
+#include <wtf/NeverDestroyed.h>
#if USE(GLIB)
#include <wtf/glib/RunLoopSourcePriority.h>
#endif
@@ -101,8 +103,8 @@
{
// Use a RunLoop::Timer instead of RunLoop::dispatch() to be able to use a different priority and
// avoid the double queue because dispatchOnMainThread also queues the functions.
- static MainThreadDispatcher dispatcher;
- dispatcher.schedule();
+ static NeverDestroyed<MainThreadDispatcher> dispatcher;
+ dispatcher.get().schedule();
}
} // namespace WTF
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes