| Differences between
and this patch
- a/Source/WebKit/ChangeLog +18 lines
Lines 1-3 a/Source/WebKit/ChangeLog_sec1
1
2019-06-11  Jiewen Tan  <jiewen_tan@apple.com>
2
3
        REGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transports.size() <= maxTransportNumber seen with two http/wpt/webauthn/public-key-credential-* tests
4
        https://bugs.webkit.org/show_bug.cgi?id=197917
5
        <rdar://problem/51524958>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        This is a race condition that when a new request comes in the middle between the previous one finishes and the clearStateAsync is queued in the main thread.
10
        Therefore, when the new request starts discovery, it will still see previous request's state.
11
12
        To fix this issue, clearState() will be called unconditionally for every request. And a guard is added to clearState() to prevent double clearance.
13
14
        * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
15
        (WebKit::AuthenticatorManager::makeCredential):
16
        (WebKit::AuthenticatorManager::getAssertion):
17
        (WebKit::AuthenticatorManager::clearState):
18
1
2019-06-11  Patrick Griffis  <pgriffis@igalia.com>
19
2019-06-11  Patrick Griffis  <pgriffis@igalia.com>
2
20
3
        [GTK] Fix a11y support in bubblewrap sandbox
21
        [GTK] Fix a11y support in bubblewrap sandbox
- a/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp -3 / +4 lines
Lines 130-138 void AuthenticatorManager::makeCredential(const Vector<uint8_t>& hash, const Pub a/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp_sec1
130
130
131
    if (m_pendingCompletionHandler) {
131
    if (m_pendingCompletionHandler) {
132
        m_pendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by a new request."_s });
132
        m_pendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by a new request."_s });
133
        clearState();
134
        m_requestTimeOutTimer.stop();
133
        m_requestTimeOutTimer.stop();
135
    }
134
    }
135
    clearState();
136
136
137
    // 1. Save request for async operations.
137
    // 1. Save request for async operations.
138
    m_pendingRequestData = { hash, true, options, { } };
138
    m_pendingRequestData = { hash, true, options, { } };
Lines 149-157 void AuthenticatorManager::getAssertion(const Vector<uint8_t>& hash, const Publi a/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp_sec2
149
149
150
    if (m_pendingCompletionHandler) {
150
    if (m_pendingCompletionHandler) {
151
        m_pendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by a new request."_s });
151
        m_pendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by a new request."_s });
152
        clearState();
153
        m_requestTimeOutTimer.stop();
152
        m_requestTimeOutTimer.stop();
154
    }
153
    }
154
    clearState();
155
155
156
    // 1. Save request for async operations.
156
    // 1. Save request for async operations.
157
    m_pendingRequestData = { hash, false, { }, options };
157
    m_pendingRequestData = { hash, false, { }, options };
Lines 174-181 void AuthenticatorManager::clearStateAsync() a/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp_sec3
174
174
175
void AuthenticatorManager::clearState()
175
void AuthenticatorManager::clearState()
176
{
176
{
177
    if (m_pendingCompletionHandler)
178
        return;
177
    m_pendingRequestData = { };
179
    m_pendingRequestData = { };
178
    ASSERT(!m_pendingCompletionHandler);
179
    m_services.clear();
180
    m_services.clear();
180
    m_authenticators.clear();
181
    m_authenticators.clear();
181
}
182
}
- a/LayoutTests/ChangeLog +10 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2019-06-11  Jiewen Tan  <jiewen_tan@apple.com>
2
3
        REGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transports.size() <= maxTransportNumber seen with two http/wpt/webauthn/public-key-credential-* tests
4
        https://bugs.webkit.org/show_bug.cgi?id=197917
5
        <rdar://problem/51524958>
6
7
        Reviewed by NOBODY (OOPS!).
8
9
        * platform/mac-wk2/TestExpectations:
10
1
2019-06-11  Commit Queue  <commit-queue@webkit.org>
11
2019-06-11  Commit Queue  <commit-queue@webkit.org>
2
12
3
        Unreviewed, rolling out r246320.
13
        Unreviewed, rolling out r246320.
- a/LayoutTests/platform/mac-wk2/TestExpectations -6 lines
Lines 920-931 webkit.org/b/194916 fast/mediastream/MediaStream-video-element.html [ Pass Failu a/LayoutTests/platform/mac-wk2/TestExpectations_sec1
920
920
921
webkit.org/b/196376 storage/domstorage/localstorage/private-browsing-affects-storage.html [ Pass Failure ]
921
webkit.org/b/196376 storage/domstorage/localstorage/private-browsing-affects-storage.html [ Pass Failure ]
922
922
923
webkit.org/b/197917 [ Debug ] http/wpt/webauthn/public-key-credential-create-success-hid.https.html [ Skip ]
924
webkit.org/b/197917 [ Debug ] http/wpt/webauthn/public-key-credential-get-success-hid.https.html [ Skip ]
925
926
webkit.org/b/194780 http/wpt/webauthn/public-key-credential-create-success-hid.https.html [ Pass Failure ]
927
webkit.org/b/196377 http/wpt/webauthn/public-key-credential-get-success-hid.https.html [ Pass Failure ]
928
929
webkit.org/b/196400 fast/mediastream/MediaStreamTrack-getSettings.html [ Pass Failure ]
923
webkit.org/b/196400 fast/mediastream/MediaStreamTrack-getSettings.html [ Pass Failure ]
930
924
931
webkit.org/b/196403 imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-stop.html [ Pass Failure ]
925
webkit.org/b/196403 imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-stop.html [ Pass Failure ]

Return to Bug 197917