Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (263574 => 263575)
--- trunk/Source/_javascript_Core/ChangeLog 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1,3 +1,15 @@
+2020-06-26 Geoffrey Garen <[email protected]>
+
+ Initializing the main thread should initialize the main run loop
+ https://bugs.webkit.org/show_bug.cgi?id=213637
+
+ Reviewed by Anders Carlsson.
+
+ * _javascript_Core.order: Removed some defunct stuff.
+ * shell/playstation/TestShell.cpp:
+ (setupTestRun): Merged initializeThreading call with
+ initializeMainThread call because initializeMainThread is a superset.
+
2020-06-25 Yusuke Suzuki <[email protected]>
REGRESSION(r263035): stress/get-prototype-of.js broken on s390x
Modified: trunk/Source/_javascript_Core/_javascript_Core.order (263574 => 263575)
--- trunk/Source/_javascript_Core/_javascript_Core.order 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/_javascript_Core/_javascript_Core.order 2020-06-26 19:28:18 UTC (rev 263575)
@@ -49,9 +49,6 @@
__ZN3JSC13CodeProfiling15notifyAllocatorEPN3WTF13MetaAllocatorE
__ZN3JSC7JSStack19initializeThreadingEv
__ZN3JSC5LLInt10initializeEv
-__ZN3WTF39initializeMainThreadToProcessMainThreadEv
-__ZN3WTFL43initializeMainThreadToProcessMainThreadOnceEv
-__ZN3WTF47initializeMainThreadToProcessMainThreadPlatformEv
__ZN3WTF19initializeGCThreadsEv
__ZN3WTF18FunctionDispatcherC2Ev
__ZN3WTF20initializeMainThreadEv
Modified: trunk/Source/_javascript_Core/shell/playstation/TestShell.cpp (263574 => 263575)
--- trunk/Source/_javascript_Core/shell/playstation/TestShell.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/_javascript_Core/shell/playstation/TestShell.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -30,13 +30,11 @@
// Need to initialize WTF threading before we start any threads. Cannot initialize JSC
// threading yet, since that would do somethings that we'd like to defer until after we
// have a chance to parse options.
- WTF::initializeThreading();
+ WTF::initializeMainThread();
// Need to override and enable restricted options before we start parsing options below.
Config::enableRestrictedOptions();
- // Initialize JSC before getting VM.
- WTF::initializeMainThread();
JSC::initializeThreading();
#if ENABLE(WEBASSEMBLY)
Modified: trunk/Source/WTF/ChangeLog (263574 => 263575)
--- trunk/Source/WTF/ChangeLog 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WTF/ChangeLog 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1,3 +1,33 @@
+2020-06-26 Geoffrey Garen <[email protected]>
+
+ Initializing the main thread should initialize the main run loop
+ https://bugs.webkit.org/show_bug.cgi?id=213637
+
+ Reviewed by Anders Carlsson.
+
+ Previously, some code initialized one, some the other, and some both;
+ and some code tried to initialize more than once; and some code tried
+ to initialize in ways that would crash but luckily got pre-empted by
+ other code that had already initialized.
+
+ In addition to general confusion, this setup made it subtly high stakes
+ to call certain functions, like callOnMainThread or
+ RunLoop::main().dispatch(), because they might crash if the right
+ initialization had not been performed.
+
+ Let's fix that.
+
+ * wtf/MainThread.cpp:
+ (WTF::initializeMainThread): Removed defunct comment about
+ initializeMainThreadToProcessMainThread. Shrank scope of initializeKey.
+ * wtf/RunLoop.cpp:
+ (WTF::RunLoop::initializeMain): Don't call initializeMainThread anymore
+ because it calls us now. No need for a store fence since we run on the
+ main thread and we don't store anything.
+ (WTF::RunLoop::initializeWeb): Upgrade to RELEASE_ASSERT.
+ * wtf/RunLoop.h: Removed incorrect comment. (Fascinating to wonder when
+ it became incorrect.)
+
2020-06-25 Sam Weinig <[email protected]>
Add a new templated string type to help write more idiomatic parsing code
Modified: trunk/Source/WTF/wtf/MainThread.cpp (263574 => 263575)
--- trunk/Source/WTF/wtf/MainThread.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WTF/wtf/MainThread.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -49,13 +49,13 @@
return functionQueue;
}
-// Share this initializeKey with initializeMainThread and initializeMainThreadToProcessMainThread.
-static std::once_flag initializeKey;
void initializeMainThread()
{
+ static std::once_flag initializeKey;
std::call_once(initializeKey, [] {
initializeThreading();
initializeMainThreadPlatform();
+ RunLoop::initializeMain();
});
}
Modified: trunk/Source/WTF/wtf/RunLoop.cpp (263574 => 263575)
--- trunk/Source/WTF/wtf/RunLoop.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WTF/wtf/RunLoop.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -54,10 +54,7 @@
void RunLoop::initializeMain()
{
- if (s_mainRunLoop)
- return;
- initializeMainThread();
- WTF::storeStoreFence();
+ RELEASE_ASSERT(!s_mainRunLoop);
s_mainRunLoop = &RunLoop::current();
}
@@ -81,6 +78,7 @@
#if USE(WEB_THREAD)
void RunLoop::initializeWeb()
{
+ RELEASE_ASSERT(!s_webRunLoop);
s_webRunLoop = &RunLoop::current();
}
Modified: trunk/Source/WTF/wtf/RunLoop.h (263574 => 263575)
--- trunk/Source/WTF/wtf/RunLoop.h 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WTF/wtf/RunLoop.h 2020-06-26 19:28:18 UTC (rev 263575)
@@ -58,8 +58,7 @@
class RunLoop final : public FunctionDispatcher {
WTF_MAKE_NONCOPYABLE(RunLoop);
public:
- // Must be called from the main thread (except for the Mac platform, where it
- // can be called from any thread).
+ // Must be called from the main thread.
WTF_EXPORT_PRIVATE static void initializeMain();
#if USE(WEB_THREAD)
WTF_EXPORT_PRIVATE static void initializeWeb();
Modified: trunk/Source/WebCore/ChangeLog (263574 => 263575)
--- trunk/Source/WebCore/ChangeLog 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebCore/ChangeLog 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1,3 +1,17 @@
+2020-06-26 Geoffrey Garen <[email protected]>
+
+ Initializing the main thread should initialize the main run loop
+ https://bugs.webkit.org/show_bug.cgi?id=213637
+
+ Reviewed by Anders Carlsson.
+
+ * platform/ios/wak/WebCoreThread.mm:
+ (RunWebThread): Removed call to initializeMainThread() because the main
+ thread calls it before starting the web thread, so it's a no-op. (And if
+ it were an op, it would be broken.)
+ (StartWebThread): Merged RunLoop::initializeMain and initializeThreading
+ into initializeMainThread.
+
2020-06-26 Andres Gonzalez <[email protected]>
Fix for crash in AXIsolatedObject::relativeFrame.
Modified: trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm (263574 => 263575)
--- trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebCore/platform/ios/wak/WebCoreThread.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -584,10 +584,9 @@
{
FloatingPointEnvironment::singleton().propagateMainThreadEnvironment();
- // WTF::initializeMainThread() needs to be called before JSC::initializeThreading() since the
+ // WTF::initializeWebThread() needs to be called before JSC::initializeThreading() since the
// code invoked by the latter needs to know if it's running on the WebThread. See
// <rdar://problem/8502487>.
- WTF::initializeMainThread();
WTF::initializeWebThread();
JSC::initializeThreading();
@@ -633,7 +632,7 @@
webThreadStarted = TRUE;
// ThreadGlobalData touches AtomString, which requires Threading initialization.
- WTF::initializeThreading();
+ WTF::initializeMainThread();
// Initialize AtomString on the main thread.
WTF::AtomString::init();
@@ -643,8 +642,6 @@
WebCore::ThreadGlobalData& unused = WebCore::threadGlobalData();
UNUSED_PARAM(unused);
- RunLoop::initializeMain();
-
// register class for WebThread deallocation
WebCoreObjCDeallocOnWebThread([WAKWindow class]);
WebCoreObjCDeallocWithWebThreadLock([WAKView class]);
Modified: trunk/Source/WebDriver/ChangeLog (263574 => 263575)
--- trunk/Source/WebDriver/ChangeLog 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebDriver/ChangeLog 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1,3 +1,13 @@
+2020-06-26 Geoffrey Garen <[email protected]>
+
+ Initializing the main thread should initialize the main run loop
+ https://bugs.webkit.org/show_bug.cgi?id=213637
+
+ Reviewed by Anders Carlsson.
+
+ * WebDriverService.cpp:
+ (WebDriver::WebDriverService::run):
+
2020-06-23 Chris Dumez <[email protected]>
Remove a lot of unnecessary calls to Ref::copyRef()
Modified: trunk/Source/WebDriver/WebDriverService.cpp (263574 => 263575)
--- trunk/Source/WebDriver/WebDriverService.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebDriver/WebDriverService.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -96,7 +96,7 @@
return EXIT_FAILURE;
}
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
if (!m_server.listen(host, port))
return EXIT_FAILURE;
Modified: trunk/Source/WebKit/ChangeLog (263574 => 263575)
--- trunk/Source/WebKit/ChangeLog 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKit/ChangeLog 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1,3 +1,16 @@
+2020-06-26 Geoffrey Garen <[email protected]>
+
+ Initializing the main thread should initialize the main run loop
+ https://bugs.webkit.org/show_bug.cgi?id=213637
+
+ Reviewed by Anders Carlsson.
+
+ * Shared/Cocoa/WebKit2InitializeCocoa.mm:
+ (WebKit::runInitializationCode):
+ (WebKit::InitializeWebKit2):
+ * Shared/WebKit2Initialize.cpp:
+ (WebKit::InitializeWebKit2):
+
2020-06-26 Chris Dumez <[email protected]>
[iOS] Network process is crashing when launching TJMaxx app due to invalid NetworkProcess::DestroySession IPC message
Modified: trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm (263574 => 263575)
--- trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKit/Shared/Cocoa/WebKit2InitializeCocoa.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -53,7 +53,7 @@
#endif
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
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::initializeMain()
+ // Make sure the initialization code is run only once and on the main thread since things like initializeMainThread()
// 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 (263574 => 263575)
--- trunk/Source/WebKit/Shared/WebKit2Initialize.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKit/Shared/WebKit2Initialize.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -40,7 +40,7 @@
void InitializeWebKit2()
{
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
AtomString::init();
WTF::RefCountedBase::enableThreadingChecksGlobally();
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1,3 +1,48 @@
+2020-06-26 Geoffrey Garen <[email protected]>
+
+ Initializing the main thread should initialize the main run loop
+ https://bugs.webkit.org/show_bug.cgi?id=213637
+
+ Reviewed by Anders Carlsson.
+
+ * 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-26 Wenson Hsieh <[email protected]>
Add a test to verify that async clipboard API write access is granted when copying in subframes
Modified: trunk/Source/WebKitLegacy/mac/History/WebBackForwardList.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/History/WebBackForwardList.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/History/WebBackForwardList.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -99,7 +99,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/History/WebHistoryItem.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -126,7 +126,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -64,7 +64,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebElementDictionary.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/Misc/WebElementDictionary.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebElementDictionary.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -68,7 +68,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -98,7 +98,7 @@
+ (void)initialize
{
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
}
+ (WebIconDatabase *)sharedIconDatabase
Modified: trunk/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -106,7 +106,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
sendUserChangeNotifications();
}
Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebBaseNetscapePluginView.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -71,7 +71,7 @@
+ (void)initialize
{
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
WebKit::sendUserChangeNotifications();
}
Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebBasePluginPackage.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -60,7 +60,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -163,7 +163,7 @@
+ (void)initialize
{
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
sendUserChangeNotifications();
}
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebEditorClient.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -139,7 +139,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -2343,7 +2343,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebArchive.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebArchive.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebArchive.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -70,7 +70,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebDataSource.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebDataSource.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDataSource.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -154,7 +154,7 @@
if (self == [WebDataSource class]) {
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
}
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1032,7 +1032,7 @@
// And some of this work is likely redundant since +[WebHTMLView initialize] is guaranteed to run first.
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
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::initializeMain();
+ WTF::initializeMainThread();
}
#endif
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -388,7 +388,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
bool attachmentElementEnabled = MacApplication::isAppleMail();
bool webSQLEnabled = false;
#else
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebResource.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebResource.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebResource.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -68,7 +68,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebTextIterator.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebTextIterator.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebTextIterator.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -48,7 +48,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -5558,7 +5558,7 @@
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
WTF::RefCountedBase::enableThreadingChecksGlobally();
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebViewData.mm (263574 => 263575)
--- trunk/Source/WebKitLegacy/mac/WebView/WebViewData.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebViewData.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -168,7 +168,7 @@
{
#if !PLATFORM(IOS_FAMILY)
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
#endif
}
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (263574 => 263575)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1,3 +1,13 @@
+2020-06-26 Geoffrey Garen <[email protected]>
+
+ Initializing the main thread should initialize the main run loop
+ https://bugs.webkit.org/show_bug.cgi?id=213637
+
+ Reviewed by Anders Carlsson.
+
+ * WebView.cpp:
+ (WebView::WebView):
+
2020-06-19 Chris Dumez <[email protected]>
Move Prefixed WebAudio interfaces behind their own feature flag
Modified: trunk/Source/WebKitLegacy/win/WebView.cpp (263574 => 263575)
--- trunk/Source/WebKitLegacy/win/WebView.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Source/WebKitLegacy/win/WebView.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -421,7 +421,7 @@
WebView::WebView()
{
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
WTF::setProcessPrivileges(allPrivileges());
WebCore::NetworkStorageSession::permitProcessToUseCookieAPI(true);
Modified: trunk/Tools/ChangeLog (263574 => 263575)
--- trunk/Tools/ChangeLog 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/ChangeLog 2020-06-26 19:28:18 UTC (rev 263575)
@@ -1,3 +1,35 @@
+2020-06-26 Geoffrey Garen <[email protected]>
+
+ Initializing the main thread should initialize the main run loop
+ https://bugs.webkit.org/show_bug.cgi?id=213637
+
+ Reviewed by Anders Carlsson.
+
+ Updated TestWebKitAPI to stop using RunLoop::initializeMain directly.
+
+ * 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):
+ * TestWebKitAPI/TestsController.cpp:
+ (TestWebKitAPI::TestsController::TestsController):
+ * WebKitTestRunner/TestController.cpp:
+ (TestController::initialize):
+
2020-06-26 Jonathan Bedard <[email protected]>
run-_javascript_core-tests: Support Apple Silicon running x86 processes
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -585,7 +585,7 @@
TEST(WTF_RefPtr, ReleaseInNonMainThreadDestroyInMainThread)
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
done = false;
Thread::create("", [object = MainThreadSafeRefCountedObject::create()] { });
TestWebKitAPI::Util::run(&done);
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/RunLoop.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -36,7 +36,7 @@
TEST(WTF_RunLoop, Deadlock)
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
struct DispatchFromDestructorTester {
~DispatchFromDestructorTester() {
@@ -76,7 +76,7 @@
TEST(WTF_RunLoop, OneShotTimer)
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
bool testFinished = false;
DerivedOneShotTimer timer(testFinished);
@@ -108,7 +108,7 @@
TEST(WTF_RunLoop, RepeatingTimer)
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
bool testFinished = false;
DerivedRepeatingTimer timer(testFinished);
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -39,7 +39,7 @@
AbortableTaskQueue taskQueue;
bool testFinished { false };
int currentStep { 0 };
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto backgroundThreadFunction = [&]() {
EXPECT_FALSE(isMainThread());
@@ -101,7 +101,7 @@
bool testFinished { false };
bool destructedResponseFlag { false };
int currentStep { 0 };
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto backgroundThreadFunction = [&]() {
EXPECT_FALSE(isMainThread());
@@ -183,7 +183,7 @@
AbortableTaskQueue taskQueue;
bool testFinished { false };
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto backgroundThreadFunction = [&]() {
EXPECT_FALSE(isMainThread());
@@ -240,7 +240,7 @@
{
AbortableTaskQueue taskQueue;
bool testFinished { false };
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto backgroundThreadFunction = [&]() {
EXPECT_FALSE(isMainThread());
@@ -277,7 +277,7 @@
bool testFinished { false };
int currentStep { 0 };
bool destructedResponseFlag { false };
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto backgroundThreadFunction = [&]() {
EXPECT_FALSE(isMainThread());
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -57,7 +57,7 @@
virtual void SetUp()
{
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
m_manifestURL = { { }, "https://example.com/manifest.json" };
m_documentURL = { { }, "https://example.com/" };
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -40,7 +40,7 @@
virtual void SetUp()
{
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
}
};
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -76,7 +76,7 @@
virtual void SetUp()
{
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
}
};
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/DNS.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -41,7 +41,7 @@
TEST(DNSTest, cancelResolveDNS)
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
const String hostname = String("www.webkit.org");
uint64_t identifier = 1;
@@ -63,7 +63,7 @@
TEST(DNSTest, cannotResolveDNS)
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
const String hostname = String("notavaliddomain.notavaliddomain");
uint64_t identifier = 1;
@@ -84,7 +84,7 @@
TEST(DNSTest, resolveDNS)
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
const String hostname = String("www.webkit.org");
uint64_t identifier = 1;
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -52,7 +52,7 @@
public:
void SetUp() override
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
// create temp file
FileSystem::PlatformFileHandle handle;
@@ -144,7 +144,7 @@
{
EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto testQueue = WorkQueue::create("Test Work Queue");
@@ -186,7 +186,7 @@
{
EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto testQueue = WorkQueue::create("Test Work Queue");
@@ -246,7 +246,7 @@
{
EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto testQueue = WorkQueue::create("Test Work Queue");
@@ -285,7 +285,7 @@
{
EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto testQueue = WorkQueue::create("Test Work Queue");
@@ -342,7 +342,7 @@
{
EXPECT_TRUE(FileSystem::fileExists(tempFilePath()));
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
auto testQueue = WorkQueue::create("Test Work Queue");
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm 2020-06-26 19:28:18 UTC (rev 263575)
@@ -124,7 +124,7 @@
static void initializeInAppBrowserPrivacyTestSettings()
{
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
WebCore::clearApplicationBundleIdentifierTestingOverride();
IN_APP_BROWSER_PRIVACY_ADDITIONS
}
Modified: trunk/Tools/TestWebKitAPI/TestsController.cpp (263574 => 263575)
--- trunk/Tools/TestWebKitAPI/TestsController.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/TestWebKitAPI/TestsController.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -74,7 +74,6 @@
// the ThreadRestrictionVerifier - https://bugs.webkit.org/show_bug.cgi?id=66112
// We should make sure that all objects tested either initialize threading or inherit from
// ThreadSafeRefCounted so that we don't have to initialize threading at all here.
- WTF::initializeThreading();
WTF::initializeMainThread();
WTF::setProcessPrivileges(allPrivileges());
AtomString::init();
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (263574 => 263575)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2020-06-26 19:26:59 UTC (rev 263574)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2020-06-26 19:28:18 UTC (rev 263575)
@@ -445,7 +445,7 @@
AutodrainedPool pool;
JSC::initializeThreading();
- RunLoop::initializeMain();
+ WTF::initializeMainThread();
WTF::setProcessPrivileges(allPrivileges());
platformInitialize();