Title: [238579] trunk/Source/WebKit
Revision
238579
Author
[email protected]
Date
2018-11-27 14:40:51 -0800 (Tue, 27 Nov 2018)

Log Message

(r238246) [ MacOS Debug ] Layout Test http/wpt/webauthn/ctap-hid-failure.https.html is Crashing
https://bugs.webkit.org/show_bug.cgi?id=191757

Reviewed by Chris Dumez.

Wrong nonce error causes retransmission, which then trigger wrong nonce error. This is expected
behavior for mock testing. However, the main thread could time out when MockHidConnection::send
is excuting the block on another thread. The block will then return without invoking the callback,
which triggers this WTFCrash. The solution is always invoking the callback before return in the
block.

* UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
(WebKit::MockHidConnection::send):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (238578 => 238579)


--- trunk/Source/WebKit/ChangeLog	2018-11-27 22:14:56 UTC (rev 238578)
+++ trunk/Source/WebKit/ChangeLog	2018-11-27 22:40:51 UTC (rev 238579)
@@ -1,3 +1,19 @@
+2018-11-27  Jiewen Tan  <[email protected]>
+
+        (r238246) [ MacOS Debug ] Layout Test http/wpt/webauthn/ctap-hid-failure.https.html is Crashing
+        https://bugs.webkit.org/show_bug.cgi?id=191757
+
+        Reviewed by Chris Dumez.
+
+        Wrong nonce error causes retransmission, which then trigger wrong nonce error. This is expected
+        behavior for mock testing. However, the main thread could time out when MockHidConnection::send
+        is excuting the block on another thread. The block will then return without invoking the callback,
+        which triggers this WTFCrash. The solution is always invoking the callback before return in the
+        block.
+
+        * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
+        (WebKit::MockHidConnection::send):
+
 2018-11-27  Keith Rollin  <[email protected]>
 
         Better parsing of comments in generate-message*.py

Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp (238578 => 238579)


--- trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp	2018-11-27 22:14:56 UTC (rev 238578)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp	2018-11-27 22:40:51 UTC (rev 238579)
@@ -73,8 +73,10 @@
     auto task = BlockPtr<void()>::fromCallable([weakThis = makeWeakPtr(*this), data = "" callback = WTFMove(callback)]() mutable {
         ASSERT(!RunLoop::isMain());
         RunLoop::main().dispatch([weakThis, data = "" callback = WTFMove(callback)]() mutable {
-            if (!weakThis)
+            if (!weakThis) {
+                callback(DataSent::No);
                 return;
+            }
 
             weakThis->assembleRequest(WTFMove(data));
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to