Title: [210144] trunk/Source/WebKit/mac
- Revision
- 210144
- Author
- [email protected]
- Date
- 2016-12-23 20:39:52 -0800 (Fri, 23 Dec 2016)
Log Message
[iOS] DumpRenderTree triggers an assertion failure when calling +[WebPreferences _switchNetworkLoaderToNewTestingSession]
https://bugs.webkit.org/show_bug.cgi?id=166471
Reviewed by Andreas Kling.
When DumpRenderTree starts up, it calls
+[WebPreferences _switchNetworkLoaderToNewTestingSession] from the main thread. In Debug
builds, this triggers the ASSERT(isMainThread()) in
NetworkStorageSession::defaultNetworkStorageSession() because the Web thread has already
started, we are on the main thread, and we are not holding the Web thread lock. This is
causing all layout tests to crash in the iOS WK1 Debug configuration.
* WebView/WebPreferences.mm: (+[WebPreferences _switchNetworkLoaderToNewTestingSession]):
Take the Web thread lock before calling NetworkStorageSession::switchToNewTestingSession().
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (210143 => 210144)
--- trunk/Source/WebKit/mac/ChangeLog 2016-12-24 01:14:59 UTC (rev 210143)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-12-24 04:39:52 UTC (rev 210144)
@@ -1,3 +1,20 @@
+2016-12-23 Andy Estes <[email protected]>
+
+ [iOS] DumpRenderTree triggers an assertion failure when calling +[WebPreferences _switchNetworkLoaderToNewTestingSession]
+ https://bugs.webkit.org/show_bug.cgi?id=166471
+
+ Reviewed by Andreas Kling.
+
+ When DumpRenderTree starts up, it calls
+ +[WebPreferences _switchNetworkLoaderToNewTestingSession] from the main thread. In Debug
+ builds, this triggers the ASSERT(isMainThread()) in
+ NetworkStorageSession::defaultNetworkStorageSession() because the Web thread has already
+ started, we are on the main thread, and we are not holding the Web thread lock. This is
+ causing all layout tests to crash in the iOS WK1 Debug configuration.
+
+ * WebView/WebPreferences.mm: (+[WebPreferences _switchNetworkLoaderToNewTestingSession]):
+ Take the Web thread lock before calling NetworkStorageSession::switchToNewTestingSession().
+
2016-12-22 Andy Estes <[email protected]>
Make WebCore::EditorInsertAction an enum class
Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (210143 => 210144)
--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2016-12-24 01:14:59 UTC (rev 210143)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2016-12-24 04:39:52 UTC (rev 210144)
@@ -1820,6 +1820,9 @@
+ (void)_switchNetworkLoaderToNewTestingSession
{
+#if PLATFORM(IOS)
+ WebThreadLock();
+#endif
NetworkStorageSession::switchToNewTestingSession();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes