Title: [262878] trunk
Revision
262878
Author
gga...@apple.com
Date
2020-06-10 17:15:05 -0700 (Wed, 10 Jun 2020)

Log Message

Some style improvements to main thread code
https://bugs.webkit.org/show_bug.cgi?id=213051

Reviewed by Darin Adler.

Source/WebCore:

Updated for rename.

* WebCore.order:
* platform/ios/wak/WebCoreThread.mm:
(StartWebThread):

Source/WebDriver:

Updated for rename.

* WebDriverService.cpp:
(WebDriver::WebDriverService::run):

Source/WebKit:

Updated for rename.

* Shared/Cocoa/WebKit2InitializeCocoa.mm:
(WebKit::runInitializationCode):
(WebKit::InitializeWebKit2):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):

Source/WebKitLegacy/mac:

Updated for rename.

* History/WebBackForwardList.mm:
(+[WebBackForwardList initialize]):
* History/WebHistoryItem.mm:
(+[WebHistoryItem initialize]):
* Misc/WebCache.mm:
(+[WebCache initialize]):
* Misc/WebElementDictionary.mm:
(+[WebElementDictionary initialize]):
* Misc/WebIconDatabase.mm:
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(+[WebHostedNetscapePluginView initialize]):
* Plugins/WebBaseNetscapePluginView.mm:
* Plugins/WebBasePluginPackage.mm:
(+[WebBasePluginPackage initialize]):
* Plugins/WebNetscapePluginView.mm:
(+[WebNetscapePluginView initialize]):
* WebCoreSupport/WebEditorClient.mm:
(+[WebUndoStep initialize]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(+[WebFramePolicyListener initialize]):
* WebView/WebArchive.mm:
(+[WebArchivePrivate initialize]):
* WebView/WebDataSource.mm:
(+[WebDataSource initialize]):
* WebView/WebHTMLView.mm:
(+[WebHTMLViewPrivate initialize]):
(+[WebHTMLView initialize]):
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebResource.mm:
(+[WebResourcePrivate initialize]):
* WebView/WebTextIterator.mm:
(+[WebTextIteratorPrivate initialize]):
* WebView/WebView.mm:
(+[WebView initialize]):
* WebView/WebViewData.mm:
(+[WebViewPrivate initialize]):

Source/WebKitLegacy/win:

Updated for rename.

* WebView.cpp:
(WebView::WebView):

Source/WTF:

* wtf/RunLoop.cpp:
(WTF::RunLoop::initializeMain): Renamed initializeMainRunLoop => initializeMain
to match the getter's name.
(WTF::RunLoop::initializeWeb): Samesies.
(WTF::RunLoop::webIfExists): Added an IfExists accessor for use in
scheduleDispatchFunctionsOnMainThread().
(WTF::RunLoop::initializeMainRunLoop): Deleted.
(WTF::RunLoop::initializeWebRunLoop): Deleted.

* wtf/RunLoop.h:

* wtf/cocoa/MainThreadCocoa.mm:
(WTF::scheduleDispatchFunctionsOnMainThread): Use RunLoop::webIfExists()
to check for the web thread run loop, since that's more explicit than
checking a pthread variable.

(WTF::isWebThread): Renamed mainThreadPthread => webThreadPthread because
it's the web thread. Changed style on globals to "s_" for consistency.
Removed mainThreadNSThread because it was unused.
(WTF::initializeApplicationUIThread):
(WTF::initializeWebThread):
(WTF::canCurrentThreadAccessThreadLocalData):

Tools:

Updated for rename.

* TestWebKitAPI/Tests/WTF/RefPtr.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/RunLoop.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp:
(ApplicationManifestParserTest::SetUp):
* TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
(TestWebKitAPI::ComplexTextControllerTest::SetUp):
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::ContentExtensionTest::SetUp):
* TestWebKitAPI/Tests/WebCore/DNS.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
(initializeInAppBrowserPrivacyTestSettings):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (262877 => 262878)


--- trunk/Source/WTF/ChangeLog	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WTF/ChangeLog	2020-06-11 00:15:05 UTC (rev 262878)
@@ -1,5 +1,35 @@
 2020-06-10  Geoffrey Garen  <gga...@apple.com>
 
+        Some style improvements to main thread code
+        https://bugs.webkit.org/show_bug.cgi?id=213051
+
+        Reviewed by Darin Adler.
+
+        * wtf/RunLoop.cpp:
+        (WTF::RunLoop::initializeMain): Renamed initializeMainRunLoop => initializeMain
+        to match the getter's name.
+        (WTF::RunLoop::initializeWeb): Samesies.
+        (WTF::RunLoop::webIfExists): Added an IfExists accessor for use in
+        scheduleDispatchFunctionsOnMainThread().
+        (WTF::RunLoop::initializeMainRunLoop): Deleted.
+        (WTF::RunLoop::initializeWebRunLoop): Deleted.
+
+        * wtf/RunLoop.h:
+
+        * wtf/cocoa/MainThreadCocoa.mm:
+        (WTF::scheduleDispatchFunctionsOnMainThread): Use RunLoop::webIfExists()
+        to check for the web thread run loop, since that's more explicit than
+        checking a pthread variable.
+
+        (WTF::isWebThread): Renamed mainThreadPthread => webThreadPthread because
+        it's the web thread. Changed style on globals to "s_" for consistency.
+        Removed mainThreadNSThread because it was unused.
+        (WTF::initializeApplicationUIThread):
+        (WTF::initializeWebThread):
+        (WTF::canCurrentThreadAccessThreadLocalData):
+
+2020-06-10  Geoffrey Garen  <gga...@apple.com>
+
         [Cocoa] Build callOnMainThread on WTF::RunLoop rather than on NSObject methods
         https://bugs.webkit.org/show_bug.cgi?id=213043
 

Modified: trunk/Source/WTF/wtf/RunLoop.cpp (262877 => 262878)


--- trunk/Source/WTF/wtf/RunLoop.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WTF/wtf/RunLoop.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -52,7 +52,7 @@
     Ref<RunLoop> m_runLoop;
 };
 
-void RunLoop::initializeMainRunLoop()
+void RunLoop::initializeMain()
 {
     if (s_mainRunLoop)
         return;
@@ -73,7 +73,7 @@
 }
 
 #if USE(WEB_THREAD)
-void RunLoop::initializeWebRunLoop()
+void RunLoop::initializeWeb()
 {
     s_webRunLoop = &RunLoop::current();
 }
@@ -83,6 +83,11 @@
     ASSERT(s_webRunLoop);
     return *s_webRunLoop;
 }
+
+RunLoop* RunLoop::webIfExists()
+{
+    return s_webRunLoop;
+}
 #endif
 
 bool RunLoop::isMain()

Modified: trunk/Source/WTF/wtf/RunLoop.h (262877 => 262878)


--- trunk/Source/WTF/wtf/RunLoop.h	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WTF/wtf/RunLoop.h	2020-06-11 00:15:05 UTC (rev 262878)
@@ -60,9 +60,9 @@
 public:
     // Must be called from the main thread (except for the Mac platform, where it
     // can be called from any thread).
-    WTF_EXPORT_PRIVATE static void initializeMainRunLoop();
+    WTF_EXPORT_PRIVATE static void initializeMain();
 #if USE(WEB_THREAD)
-    WTF_EXPORT_PRIVATE static void initializeWebRunLoop();
+    WTF_EXPORT_PRIVATE static void initializeWeb();
 #endif
 
     WTF_EXPORT_PRIVATE static RunLoop& current();
@@ -69,6 +69,7 @@
     WTF_EXPORT_PRIVATE static RunLoop& main();
 #if USE(WEB_THREAD)
     WTF_EXPORT_PRIVATE static RunLoop& web();
+    WTF_EXPORT_PRIVATE static RunLoop* webIfExists();
 #endif
     WTF_EXPORT_PRIVATE static bool isMain();
     ~RunLoop() final;

Modified: trunk/Source/WTF/wtf/cocoa/MainThreadCocoa.mm (262877 => 262878)


--- trunk/Source/WTF/wtf/cocoa/MainThreadCocoa.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WTF/wtf/cocoa/MainThreadCocoa.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -58,11 +58,10 @@
 
 #if USE(WEB_THREAD)
 // When the Web thread is enabled, we consider it to be the main thread, not pthread main.
-static pthread_t mainThreadPthread { nullptr };
-static NSThread* mainThreadNSThread { nullptr };
+static pthread_t s_webThreadPthread;
 
-static Thread* sApplicationUIThread;
-static Thread* sWebThread;
+static Thread* s_applicationUIThread;
+static Thread* s_webThread;
 #endif
 
 void initializeMainThreadPlatform()
@@ -101,8 +100,8 @@
         return;
     }
 
-    if (mainThreadPthread) {
-        RunLoop::web().dispatch(dispatchFunctionsFromMainThread);
+    if (auto* webRunLoop = RunLoop::webIfExists()) {
+        webRunLoop->dispatch(dispatchFunctionsFromMainThread);
         return;
     }
 #else
@@ -160,13 +159,13 @@
 // Keep in mind that isWebThread can be called even when destroying the current thread.
 bool isWebThread()
 {
-    return pthread_equal(pthread_self(), mainThreadPthread);
+    return pthread_equal(pthread_self(), s_webThreadPthread);
 }
 
 void initializeApplicationUIThread()
 {
     ASSERT(pthread_main_np());
-    sApplicationUIThread = &Thread::current();
+    s_applicationUIThread = &Thread::current();
 }
 
 void initializeWebThread()
@@ -174,10 +173,9 @@
     static std::once_flag initializeKey;
     std::call_once(initializeKey, [] {
         ASSERT(!pthread_main_np());
-        mainThreadPthread = pthread_self();
-        mainThreadNSThread = [NSThread currentThread];
-        sWebThread = &Thread::current();
-        RunLoop::initializeWebRunLoop();
+        s_webThreadPthread = pthread_self();
+        s_webThread = &Thread::current();
+        RunLoop::initializeWeb();
     });
 }
 
@@ -187,8 +185,8 @@
     if (&thread == &currentThread)
         return true;
 
-    if (&thread == sWebThread || &thread == sApplicationUIThread)
-        return (&currentThread == sWebThread || &currentThread == sApplicationUIThread) && webThreadIsUninitializedOrLockedOrDisabled();
+    if (&thread == s_webThread || &thread == s_applicationUIThread)
+        return (&currentThread == s_webThread || &currentThread == s_applicationUIThread) && webThreadIsUninitializedOrLockedOrDisabled();
 
     return false;
 }

Modified: trunk/Source/WebCore/ChangeLog (262877 => 262878)


--- trunk/Source/WebCore/ChangeLog	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebCore/ChangeLog	2020-06-11 00:15:05 UTC (rev 262878)
@@ -1,3 +1,16 @@
+2020-06-10  Geoffrey Garen  <gga...@apple.com>
+
+        Some style improvements to main thread code
+        https://bugs.webkit.org/show_bug.cgi?id=213051
+
+        Reviewed by Darin Adler.
+
+        Updated for rename.
+
+        * WebCore.order:
+        * platform/ios/wak/WebCoreThread.mm:
+        (StartWebThread):
+
 2020-06-10  Pinki Gyanchandani  <pgyanchand...@apple.com>
 
         Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder

Modified: trunk/Source/WebCore/WebCore.order (262877 => 262878)


--- trunk/Source/WebCore/WebCore.order	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebCore/WebCore.order	2020-06-11 00:15:05 UTC (rev 262878)
@@ -29265,7 +29265,6 @@
 __ZGVZNK7WebCore20ResourceResponseBase27parseCacheControlDirectivesEvE15maxAgeDirective.b
 __ZZNK7WebCore20ResourceResponseBase27parseCacheControlDirectivesEvE12pragmaHeader
 __ZGVZNK7WebCore20ResourceResponseBase27parseCacheControlDirectivesEvE12pragmaHeader.b
-__ZZN7WebCore7RunLoop21initializeMainRunLoopEvE9onceToken
 __ZN7WebCoreL13s_mainRunLoopE
 __ZZN7WebCoreL37ContentSecurityPolicyBypassingSchemesEvE7schemes
 __ZGVZN7WebCoreL37ContentSecurityPolicyBypassingSchemesEvE7schemes.b

Modified: trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm (262877 => 262878)


--- trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -643,7 +643,7 @@
     WebCore::ThreadGlobalData& unused = WebCore::threadGlobalData();
     UNUSED_PARAM(unused);
 
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     // register class for WebThread deallocation
     WebCoreObjCDeallocOnWebThread([WAKWindow class]);

Modified: trunk/Source/WebDriver/ChangeLog (262877 => 262878)


--- trunk/Source/WebDriver/ChangeLog	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebDriver/ChangeLog	2020-06-11 00:15:05 UTC (rev 262878)
@@ -1,3 +1,15 @@
+2020-06-10  Geoffrey Garen  <gga...@apple.com>
+
+        Some style improvements to main thread code
+        https://bugs.webkit.org/show_bug.cgi?id=213051
+
+        Reviewed by Darin Adler.
+
+        Updated for rename.
+
+        * WebDriverService.cpp:
+        (WebDriver::WebDriverService::run):
+
 2020-03-19  Charlie Turner  <ctur...@igalia.com>
 
         Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.

Modified: trunk/Source/WebDriver/WebDriverService.cpp (262877 => 262878)


--- trunk/Source/WebDriver/WebDriverService.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebDriver/WebDriverService.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -96,7 +96,7 @@
         return EXIT_FAILURE;
     }
 
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     if (!m_server.listen(host, port))
         return EXIT_FAILURE;

Modified: trunk/Source/WebKit/ChangeLog (262877 => 262878)


--- trunk/Source/WebKit/ChangeLog	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKit/ChangeLog	2020-06-11 00:15:05 UTC (rev 262878)
@@ -1,3 +1,18 @@
+2020-06-10  Geoffrey Garen  <gga...@apple.com>
+
+        Some style improvements to main thread code
+        https://bugs.webkit.org/show_bug.cgi?id=213051
+
+        Reviewed by Darin Adler.
+
+        Updated for rename.
+
+        * Shared/Cocoa/WebKit2InitializeCocoa.mm:
+        (WebKit::runInitializationCode):
+        (WebKit::InitializeWebKit2):
+        * Shared/WebKit2Initialize.cpp:
+        (WebKit::InitializeWebKit2):
+
 2020-06-10  Jonathan Bedard  <jbed...@apple.com>
 
         WebKit:Add PepperUICoreSPI.h (Follow-up fix 2)

Modified: trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm (262877 => 262878)


--- trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -53,7 +53,7 @@
 #endif
 
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     WTF::RefCountedBase::enableThreadingChecksGlobally();
 
@@ -65,7 +65,7 @@
 
 void InitializeWebKit2()
 {
-    // Make sure the initialization code is run only once and on the main thread since things like RunLoop::initializeMainRunLoop()
+    // Make sure the initialization code is run only once and on the main thread since things like RunLoop::initializeMain()
     // are only safe to call on the main thread.
     std::call_once(flag, [] {
         if ([NSThread isMainThread] || linkedOnOrAfter(SDKVersion::FirstWithInitializeWebKit2MainThreadAssertion))

Modified: trunk/Source/WebKit/Shared/WebKit2Initialize.cpp (262877 => 262878)


--- trunk/Source/WebKit/Shared/WebKit2Initialize.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKit/Shared/WebKit2Initialize.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -40,7 +40,7 @@
 void InitializeWebKit2()
 {
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
     AtomString::init();
 
     WTF::RefCountedBase::enableThreadingChecksGlobally();

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2020-06-11 00:15:05 UTC (rev 262878)
@@ -1,3 +1,50 @@
+2020-06-10  Geoffrey Garen  <gga...@apple.com>
+
+        Some style improvements to main thread code
+        https://bugs.webkit.org/show_bug.cgi?id=213051
+
+        Reviewed by Darin Adler.
+
+        Updated for rename.
+
+        * History/WebBackForwardList.mm:
+        (+[WebBackForwardList initialize]):
+        * History/WebHistoryItem.mm:
+        (+[WebHistoryItem initialize]):
+        * Misc/WebCache.mm:
+        (+[WebCache initialize]):
+        * Misc/WebElementDictionary.mm:
+        (+[WebElementDictionary initialize]):
+        * Misc/WebIconDatabase.mm:
+        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+        (+[WebHostedNetscapePluginView initialize]):
+        * Plugins/WebBaseNetscapePluginView.mm:
+        * Plugins/WebBasePluginPackage.mm:
+        (+[WebBasePluginPackage initialize]):
+        * Plugins/WebNetscapePluginView.mm:
+        (+[WebNetscapePluginView initialize]):
+        * WebCoreSupport/WebEditorClient.mm:
+        (+[WebUndoStep initialize]):
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (+[WebFramePolicyListener initialize]):
+        * WebView/WebArchive.mm:
+        (+[WebArchivePrivate initialize]):
+        * WebView/WebDataSource.mm:
+        (+[WebDataSource initialize]):
+        * WebView/WebHTMLView.mm:
+        (+[WebHTMLViewPrivate initialize]):
+        (+[WebHTMLView initialize]):
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        * WebView/WebResource.mm:
+        (+[WebResourcePrivate initialize]):
+        * WebView/WebTextIterator.mm:
+        (+[WebTextIteratorPrivate initialize]):
+        * WebView/WebView.mm:
+        (+[WebView initialize]):
+        * WebView/WebViewData.mm:
+        (+[WebViewPrivate initialize]):
+
 2020-06-09  Dean Jackson  <d...@apple.com>
 
         Stop using discriminatory names for WebGL and Plugin blocking

Modified: trunk/Source/WebKitLegacy/mac/History/WebBackForwardList.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/History/WebBackForwardList.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/History/WebBackForwardList.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -99,7 +99,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -126,7 +126,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -64,7 +64,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebElementDictionary.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/Misc/WebElementDictionary.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebElementDictionary.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -68,7 +68,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -98,7 +98,7 @@
 + (void)initialize
 {
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 }
 
 + (WebIconDatabase *)sharedIconDatabase

Modified: trunk/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -106,7 +106,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
     sendUserChangeNotifications();
 }

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -71,7 +71,7 @@
 + (void)initialize
 {
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
     WebKit::sendUserChangeNotifications();
 }
 

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -60,7 +60,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -163,7 +163,7 @@
 + (void)initialize
 {
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
     sendUserChangeNotifications();
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -139,7 +139,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -2343,7 +2343,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebArchive.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebView/WebArchive.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebArchive.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -70,7 +70,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebDataSource.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDataSource.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDataSource.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -154,7 +154,7 @@
     if (self == [WebDataSource class]) {
 #if !PLATFORM(IOS_FAMILY)
         JSC::initializeThreading();
-        RunLoop::initializeMainRunLoop();
+        RunLoop::initializeMain();
 #endif
     }
 }

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -1032,7 +1032,7 @@
     // And some of this work is likely redundant since +[WebHTMLView initialize] is guaranteed to run first.
 
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     if (!oldSetCursorForMouseLocationIMP) {
         Method setCursorMethod = class_getInstanceMethod([NSWindow class], @selector(_setCursorForMouseLocation:));
@@ -2566,7 +2566,7 @@
     [NSApp registerServicesMenuSendTypes:[[self class] _selectionPasteboardTypes] returnTypes:[[self class] _insertablePasteboardTypes]];
 
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 }
 
 #endif

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -388,7 +388,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
     bool attachmentElementEnabled = MacApplication::isAppleMail();
     bool webSQLEnabled = false;
 #else

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebResource.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebView/WebResource.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebResource.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -68,7 +68,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebTextIterator.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebView/WebTextIterator.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebTextIterator.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -48,7 +48,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -5520,7 +5520,7 @@
 
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 
     WTF::RefCountedBase::enableThreadingChecksGlobally();

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebViewData.mm (262877 => 262878)


--- trunk/Source/WebKitLegacy/mac/WebView/WebViewData.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebViewData.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -168,7 +168,7 @@
 {
 #if !PLATFORM(IOS_FAMILY)
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 #endif
 }
 

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (262877 => 262878)


--- trunk/Source/WebKitLegacy/win/ChangeLog	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2020-06-11 00:15:05 UTC (rev 262878)
@@ -1,3 +1,15 @@
+2020-06-10  Geoffrey Garen  <gga...@apple.com>
+
+        Some style improvements to main thread code
+        https://bugs.webkit.org/show_bug.cgi?id=213051
+
+        Reviewed by Darin Adler.
+
+        Updated for rename.
+
+        * WebView.cpp:
+        (WebView::WebView):
+
 2020-06-08  David Kilzer  <ddkil...@apple.com>
 
         [IPC] Adopt enum class for DragOperation

Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (262877 => 262878)


--- trunk/Source/WebKitLegacy/win/WebView.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -421,7 +421,7 @@
 WebView::WebView()
 {
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
     WTF::setProcessPrivileges(allPrivileges());
     WebCore::NetworkStorageSession::permitProcessToUseCookieAPI(true);
 

Modified: trunk/Tools/ChangeLog (262877 => 262878)


--- trunk/Tools/ChangeLog	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/ChangeLog	2020-06-11 00:15:05 UTC (rev 262878)
@@ -1,3 +1,33 @@
+2020-06-10  Geoffrey Garen  <gga...@apple.com>
+
+        Some style improvements to main thread code
+        https://bugs.webkit.org/show_bug.cgi?id=213051
+
+        Reviewed by Darin Adler.
+
+        Updated for rename.
+        
+        * TestWebKitAPI/Tests/WTF/RefPtr.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WTF/RunLoop.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp:
+        (ApplicationManifestParserTest::SetUp):
+        * TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
+        (TestWebKitAPI::ComplexTextControllerTest::SetUp):
+        * TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
+        (TestWebKitAPI::ContentExtensionTest::SetUp):
+        * TestWebKitAPI/Tests/WebCore/DNS.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
+        (TestWebKitAPI::TEST_F):
+        * TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
+        (initializeInAppBrowserPrivacyTestSettings):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::initialize):
+
 2020-06-10  Jonathan Bedard  <jbed...@apple.com>
 
         results.webkit.org: Health check should access redis and Cassandra

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -585,7 +585,7 @@
 
 TEST(WTF_RefPtr, ReleaseInNonMainThreadDestroyInMainThread)
 {
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
     done = false;
     Thread::create("", [object = MainThreadSafeRefCountedObject::create()] { });
     TestWebKitAPI::Util::run(&done);

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -36,7 +36,7 @@
 
 TEST(WTF_RunLoop, Deadlock)
 {
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     struct DispatchFromDestructorTester {
         ~DispatchFromDestructorTester() {
@@ -76,7 +76,7 @@
 
 TEST(WTF_RunLoop, OneShotTimer)
 {
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     bool testFinished = false;
     DerivedOneShotTimer timer(testFinished);
@@ -108,7 +108,7 @@
 
 TEST(WTF_RunLoop, RepeatingTimer)
 {
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     bool testFinished = false;
     DerivedRepeatingTimer timer(testFinished);

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -39,7 +39,7 @@
     AbortableTaskQueue taskQueue;
     bool testFinished { false };
     int currentStep { 0 };
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto backgroundThreadFunction = [&]() {
         EXPECT_FALSE(isMainThread());
@@ -101,7 +101,7 @@
     bool testFinished { false };
     bool destructedResponseFlag { false };
     int currentStep { 0 };
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto backgroundThreadFunction = [&]() {
         EXPECT_FALSE(isMainThread());
@@ -183,7 +183,7 @@
 
     AbortableTaskQueue taskQueue;
     bool testFinished { false };
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto backgroundThreadFunction = [&]() {
         EXPECT_FALSE(isMainThread());
@@ -240,7 +240,7 @@
 {
     AbortableTaskQueue taskQueue;
     bool testFinished { false };
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto backgroundThreadFunction = [&]() {
         EXPECT_FALSE(isMainThread());
@@ -277,7 +277,7 @@
     bool testFinished { false };
     int currentStep { 0 };
     bool destructedResponseFlag { false };
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto backgroundThreadFunction = [&]() {
         EXPECT_FALSE(isMainThread());

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -57,7 +57,7 @@
     virtual void SetUp()
     {
         JSC::initializeThreading();
-        RunLoop::initializeMainRunLoop();
+        RunLoop::initializeMain();
 
         m_manifestURL = { { }, "https://example.com/manifest.json" };
         m_documentURL = { { }, "https://example.com/" };

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -40,7 +40,7 @@
     virtual void SetUp()
     {
         JSC::initializeThreading();
-        RunLoop::initializeMainRunLoop();
+        RunLoop::initializeMain();
     }
 };
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -76,7 +76,7 @@
     virtual void SetUp()
     {
         JSC::initializeThreading();
-        RunLoop::initializeMainRunLoop();
+        RunLoop::initializeMain();
     }
 };
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -41,7 +41,7 @@
 
 TEST(DNSTest, cancelResolveDNS)
 {
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     const String hostname = String("www.webkit.org");
     uint64_t identifier = 1;
@@ -63,7 +63,7 @@
 
 TEST(DNSTest, cannotResolveDNS)
 {
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     const String hostname = String("notavaliddomain.notavaliddomain");
     uint64_t identifier = 1;
@@ -84,7 +84,7 @@
 
 TEST(DNSTest, resolveDNS)
 {
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     const String hostname = String("www.webkit.org");
     uint64_t identifier = 1;

Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -52,7 +52,7 @@
 public:
     void SetUp() override
     {
-        RunLoop::initializeMainRunLoop();
+        RunLoop::initializeMain();
         
         // create temp file
         FileSystem::PlatformFileHandle handle;
@@ -144,7 +144,7 @@
 {
     EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
 
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto testQueue = WorkQueue::create("Test Work Queue");
 
@@ -186,7 +186,7 @@
 {
     EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
 
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto testQueue = WorkQueue::create("Test Work Queue");
 
@@ -246,7 +246,7 @@
 {
     EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
 
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto testQueue = WorkQueue::create("Test Work Queue");
 
@@ -285,7 +285,7 @@
 {
     EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
 
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto testQueue = WorkQueue::create("Test Work Queue");
 
@@ -342,7 +342,7 @@
 {
     EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
 
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
 
     auto testQueue = WorkQueue::create("Test Work Queue");
 

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm (262877 => 262878)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm	2020-06-11 00:15:05 UTC (rev 262878)
@@ -124,7 +124,7 @@
 
 static void initializeInAppBrowserPrivacyTestSettings()
 {
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
     WebCore::clearApplicationBundleIdentifierTestingOverride();
     IN_APP_BROWSER_PRIVACY_ADDITIONS
 }

Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (262877 => 262878)


--- trunk/Tools/WebKitTestRunner/TestController.cpp	2020-06-11 00:10:30 UTC (rev 262877)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp	2020-06-11 00:15:05 UTC (rev 262878)
@@ -445,7 +445,7 @@
     AutodrainedPool pool;
 
     JSC::initializeThreading();
-    RunLoop::initializeMainRunLoop();
+    RunLoop::initializeMain();
     WTF::setProcessPrivileges(allPrivileges());
 
     platformInitialize();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to