Title: [263580] trunk/Source/WTF
- Revision
- 263580
- Author
- gga...@apple.com
- Date
- 2020-06-26 13:52:54 -0700 (Fri, 26 Jun 2020)
Log Message
Re-land r262863
https://bugs.webkit.org/show_bug.cgi?id=213654
Reviewed by Tadeu Zagallo.
r263575 should fix the crash we saw.
* wtf/cocoa/MainThreadCocoa.mm:
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
(-[JSWTFMainThreadCaller call]): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (263579 => 263580)
--- trunk/Source/WTF/ChangeLog 2020-06-26 20:41:29 UTC (rev 263579)
+++ trunk/Source/WTF/ChangeLog 2020-06-26 20:52:54 UTC (rev 263580)
@@ -1,5 +1,19 @@
2020-06-26 Geoffrey Garen <gga...@apple.com>
+ Re-land r262863
+ https://bugs.webkit.org/show_bug.cgi?id=213654
+
+ Reviewed by Tadeu Zagallo.
+
+ r263575 should fix the crash we saw.
+
+ * wtf/cocoa/MainThreadCocoa.mm:
+ (WTF::initializeMainThreadPlatform):
+ (WTF::scheduleDispatchFunctionsOnMainThread):
+ (-[JSWTFMainThreadCaller call]): Deleted.
+
+2020-06-26 Geoffrey Garen <gga...@apple.com>
+
Initializing the main thread should initialize the main run loop
https://bugs.webkit.org/show_bug.cgi?id=213637
Modified: trunk/Source/WTF/wtf/RunLoop.cpp (263579 => 263580)
--- trunk/Source/WTF/wtf/RunLoop.cpp 2020-06-26 20:41:29 UTC (rev 263579)
+++ trunk/Source/WTF/wtf/RunLoop.cpp 2020-06-26 20:52:54 UTC (rev 263580)
@@ -70,11 +70,6 @@
return *s_mainRunLoop;
}
-RunLoop* RunLoop::mainIfExists()
-{
- return s_mainRunLoop;
-}
-
#if USE(WEB_THREAD)
void RunLoop::initializeWeb()
{
Modified: trunk/Source/WTF/wtf/RunLoop.h (263579 => 263580)
--- trunk/Source/WTF/wtf/RunLoop.h 2020-06-26 20:41:29 UTC (rev 263579)
+++ trunk/Source/WTF/wtf/RunLoop.h 2020-06-26 20:52:54 UTC (rev 263580)
@@ -66,7 +66,6 @@
WTF_EXPORT_PRIVATE static RunLoop& current();
WTF_EXPORT_PRIVATE static RunLoop& main();
- WTF_EXPORT_PRIVATE static RunLoop* mainIfExists();
#if USE(WEB_THREAD)
WTF_EXPORT_PRIVATE static RunLoop& web();
WTF_EXPORT_PRIVATE static RunLoop* webIfExists();
Modified: trunk/Source/WTF/wtf/cocoa/MainThreadCocoa.mm (263579 => 263580)
--- trunk/Source/WTF/wtf/cocoa/MainThreadCocoa.mm 2020-06-26 20:41:29 UTC (rev 263579)
+++ trunk/Source/WTF/wtf/cocoa/MainThreadCocoa.mm 2020-06-26 20:52:54 UTC (rev 263580)
@@ -44,19 +44,6 @@
#import <wtf/ios/WebCoreThread.h>
#endif
-@interface JSWTFMainThreadCaller : NSObject
-- (void)call;
-@end
-
-@implementation JSWTFMainThreadCaller
-
-- (void)call
-{
- WTF::dispatchFunctionsFromMainThread();
-}
-
-@end
-
#define LOG_CHANNEL_PREFIX Log
namespace WTF {
@@ -67,8 +54,6 @@
WTFLogChannel LogThreading = { WTFLogChannelState::On, "Threading", WTFLogLevel::Error, LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT };
#endif
-static JSWTFMainThreadCaller* staticMainThreadCaller;
-
#if USE(WEB_THREAD)
// When the Web thread is enabled, we consider it to be the main thread, not pthread main.
static pthread_t s_webThreadPthread;
@@ -82,9 +67,6 @@
if (!pthread_main_np())
RELEASE_LOG_FAULT(Threading, "WebKit Threading Violation - initial use of WebKit from a secondary thread.");
ASSERT(pthread_main_np());
-
- ASSERT(!staticMainThreadCaller);
- staticMainThreadCaller = [[JSWTFMainThreadCaller alloc] init];
}
void scheduleDispatchFunctionsOnMainThread()
@@ -96,12 +78,7 @@
}
#endif
- if (RunLoop::mainIfExists()) {
- RunLoop::main().dispatch(dispatchFunctionsFromMainThread);
- return;
- }
-
- [staticMainThreadCaller performSelectorOnMainThread:@selector(call) withObject:nil waitUntilDone:NO];
+ RunLoop::main().dispatch(dispatchFunctionsFromMainThread);
}
void dispatchAsyncOnMainThreadWithWebThreadLockIfNeeded(void (^block)())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes