Changeset 238579 in webkit


Ignore:
Timestamp:
Nov 27, 2018 2:40:51 PM (5 years ago)
Author:
jiewen_tan@apple.com
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):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r238577 r238579  
     12018-11-27  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        (r238246) [ MacOS Debug ] Layout Test http/wpt/webauthn/ctap-hid-failure.https.html is Crashing
     4        https://bugs.webkit.org/show_bug.cgi?id=191757
     5
     6        Reviewed by Chris Dumez.
     7
     8        Wrong nonce error causes retransmission, which then trigger wrong nonce error. This is expected
     9        behavior for mock testing. However, the main thread could time out when MockHidConnection::send
     10        is excuting the block on another thread. The block will then return without invoking the callback,
     11        which triggers this WTFCrash. The solution is always invoking the callback before return in the
     12        block.
     13
     14        * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
     15        (WebKit::MockHidConnection::send):
     16
    1172018-11-27  Keith Rollin  <krollin@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp

    r238246 r238579  
    7474        ASSERT(!RunLoop::isMain());
    7575        RunLoop::main().dispatch([weakThis, data = WTFMove(data), callback = WTFMove(callback)]() mutable {
    76             if (!weakThis)
     76            if (!weakThis) {
     77                callback(DataSent::No);
    7778                return;
     79            }
    7880
    7981            weakThis->assembleRequest(WTFMove(data));
Note: See TracChangeset for help on using the changeset viewer.