Title: [283283] trunk
Revision
283283
Author
[email protected]
Date
2021-09-29 16:56:07 -0700 (Wed, 29 Sep 2021)

Log Message

[ iOS Debug ] http/tests/xmlhttprequest/access-control-preflight-credential-sync.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=228305
<rdar://problem/81136891>

Reviewed by Alex Christensen.

Source/WebKit:

When a NetworkResourceLoader for a synchronous XHR gets aborted (e.g. because the connection to
the WebProcess was severed), NetworkResourceLoader::abort() would fail to call
sendReplyToSynchronousRequest() (sendReplyToSynchronousRequest was only called in didFailLoading() and
didFinishLoading()). As a result, we would hit the following assertion in the NetworkResourceLoader
destructor later on: ASSERT(!isSynchronous() || !m_synchronousLoadData->delayedReply)

No new tests, covered by existing test that I am unskipping.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::abort):

LayoutTests:

Unskip test that should no longer be flaky.

* platform/ios-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (283282 => 283283)


--- trunk/LayoutTests/ChangeLog	2021-09-29 23:53:31 UTC (rev 283282)
+++ trunk/LayoutTests/ChangeLog	2021-09-29 23:56:07 UTC (rev 283283)
@@ -1,3 +1,15 @@
+2021-09-29  Chris Dumez  <[email protected]>
+
+        [ iOS Debug ] http/tests/xmlhttprequest/access-control-preflight-credential-sync.html is a flaky crash
+        https://bugs.webkit.org/show_bug.cgi?id=228305
+        <rdar://problem/81136891>
+
+        Reviewed by Alex Christensen.
+
+        Unskip test that should no longer be flaky.
+
+        * platform/ios-wk2/TestExpectations:
+
 2021-09-29  Kiet Ho  <[email protected]>
 
         Implement the 'ic' unit from CSS Values 4

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (283282 => 283283)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2021-09-29 23:53:31 UTC (rev 283282)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2021-09-29 23:56:07 UTC (rev 283283)
@@ -1908,8 +1908,6 @@
 
 webkit.org/b/215350 http/tests/xmlhttprequest/overridemimetype-headers-received-state-force-shiftjis.html [ Pass Timeout ]
 
-webkit.org/b/228305 [ Debug ] http/tests/xmlhttprequest/access-control-preflight-credential-sync.html [ Pass Crash ]
-
 webkit.org/b/215351 http/wpt/service-workers/module-meta-url-fragment.https.html [ Pass Failure ]
 
 webkit.org/b/228670 http/wpt/service-workers/navigation-redirect-main-frame.https.html [ Pass Timeout ]

Modified: trunk/Source/WebKit/ChangeLog (283282 => 283283)


--- trunk/Source/WebKit/ChangeLog	2021-09-29 23:53:31 UTC (rev 283282)
+++ trunk/Source/WebKit/ChangeLog	2021-09-29 23:56:07 UTC (rev 283283)
@@ -1,3 +1,22 @@
+2021-09-29  Chris Dumez  <[email protected]>
+
+        [ iOS Debug ] http/tests/xmlhttprequest/access-control-preflight-credential-sync.html is a flaky crash
+        https://bugs.webkit.org/show_bug.cgi?id=228305
+        <rdar://problem/81136891>
+
+        Reviewed by Alex Christensen.
+
+        When a NetworkResourceLoader for a synchronous XHR gets aborted (e.g. because the connection to
+        the WebProcess was severed), NetworkResourceLoader::abort() would fail to call
+        sendReplyToSynchronousRequest() (sendReplyToSynchronousRequest was only called in didFailLoading() and
+        didFinishLoading()). As a result, we would hit the following assertion in the NetworkResourceLoader
+        destructor later on: ASSERT(!isSynchronous() || !m_synchronousLoadData->delayedReply)
+
+        No new tests, covered by existing test that I am unskipping.
+
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        (WebKit::NetworkResourceLoader::abort):
+
 2021-09-29  Sihui Liu  <[email protected]>
 
         Add a default return value in convertToExceptionCode

Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (283282 => 283283)


--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2021-09-29 23:53:31 UTC (rev 283282)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2021-09-29 23:56:07 UTC (rev 283283)
@@ -523,6 +523,11 @@
         m_networkLoad->cancel();
     }
 
+    if (isSynchronous()) {
+        m_synchronousLoadData->error = ResourceError { ResourceError::Type::Cancellation };
+        sendReplyToSynchronousRequest(*m_synchronousLoadData, nullptr, { });
+    }
+
     cleanup(LoadResult::Cancel);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to