Changeset 263580 in webkit
- Timestamp:
- Jun 26, 2020 1:52:54 PM (4 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r263575 r263580 1 2020-06-26 Geoffrey Garen <ggaren@apple.com> 2 3 Re-land r262863 4 https://bugs.webkit.org/show_bug.cgi?id=213654 5 6 Reviewed by Tadeu Zagallo. 7 8 r263575 should fix the crash we saw. 9 10 * wtf/cocoa/MainThreadCocoa.mm: 11 (WTF::initializeMainThreadPlatform): 12 (WTF::scheduleDispatchFunctionsOnMainThread): 13 (-[JSWTFMainThreadCaller call]): Deleted. 14 1 15 2020-06-26 Geoffrey Garen <ggaren@apple.com> 2 16 -
trunk/Source/WTF/wtf/RunLoop.cpp
r263575 r263580 69 69 ASSERT(s_mainRunLoop); 70 70 return *s_mainRunLoop; 71 }72 73 RunLoop* RunLoop::mainIfExists()74 {75 return s_mainRunLoop;76 71 } 77 72 -
trunk/Source/WTF/wtf/RunLoop.h
r263575 r263580 67 67 WTF_EXPORT_PRIVATE static RunLoop& current(); 68 68 WTF_EXPORT_PRIVATE static RunLoop& main(); 69 WTF_EXPORT_PRIVATE static RunLoop* mainIfExists();70 69 #if USE(WEB_THREAD) 71 70 WTF_EXPORT_PRIVATE static RunLoop& web(); -
trunk/Source/WTF/wtf/cocoa/MainThreadCocoa.mm
r263524 r263580 45 45 #endif 46 46 47 @interface JSWTFMainThreadCaller : NSObject48 - (void)call;49 @end50 51 @implementation JSWTFMainThreadCaller52 53 - (void)call54 {55 WTF::dispatchFunctionsFromMainThread();56 }57 58 @end59 60 47 #define LOG_CHANNEL_PREFIX Log 61 48 … … 67 54 WTFLogChannel LogThreading = { WTFLogChannelState::On, "Threading", WTFLogLevel::Error, LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT }; 68 55 #endif 69 70 static JSWTFMainThreadCaller* staticMainThreadCaller;71 56 72 57 #if USE(WEB_THREAD) … … 83 68 RELEASE_LOG_FAULT(Threading, "WebKit Threading Violation - initial use of WebKit from a secondary thread."); 84 69 ASSERT(pthread_main_np()); 85 86 ASSERT(!staticMainThreadCaller);87 staticMainThreadCaller = [[JSWTFMainThreadCaller alloc] init];88 70 } 89 71 … … 97 79 #endif 98 80 99 if (RunLoop::mainIfExists()) { 100 RunLoop::main().dispatch(dispatchFunctionsFromMainThread); 101 return; 102 } 103 104 [staticMainThreadCaller performSelectorOnMainThread:@selector(call) withObject:nil waitUntilDone:NO]; 81 RunLoop::main().dispatch(dispatchFunctionsFromMainThread); 105 82 } 106 83
Note: See TracChangeset
for help on using the changeset viewer.