Title: [246369] trunk
- Revision
- 246369
- Author
- [email protected]
- Date
- 2019-06-12 12:06:16 -0700 (Wed, 12 Jun 2019)
Log Message
REGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transports.size() <= maxTransportNumber seen with two http/wpt/webauthn/public-key-credential-* tests
https://bugs.webkit.org/show_bug.cgi?id=197917
<rdar://problem/51524958>
Reviewed by Brent Fulgham.
Source/WebKit:
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.
Therefore, when the new request starts discovery, it will still see previous request's state.
To fix this issue, clearState() will be called unconditionally for every request. And a guard is added to clearState() to prevent double clearance.
* UIProcess/WebAuthentication/AuthenticatorManager.cpp:
(WebKit::AuthenticatorManager::makeCredential):
(WebKit::AuthenticatorManager::getAssertion):
(WebKit::AuthenticatorManager::clearState):
LayoutTests:
* platform/mac-wk2/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (246368 => 246369)
--- trunk/LayoutTests/ChangeLog 2019-06-12 18:40:56 UTC (rev 246368)
+++ trunk/LayoutTests/ChangeLog 2019-06-12 19:06:16 UTC (rev 246369)
@@ -1,3 +1,13 @@
+2019-06-12 Jiewen Tan <[email protected]>
+
+ REGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transports.size() <= maxTransportNumber seen with two http/wpt/webauthn/public-key-credential-* tests
+ https://bugs.webkit.org/show_bug.cgi?id=197917
+ <rdar://problem/51524958>
+
+ Reviewed by Brent Fulgham.
+
+ * platform/mac-wk2/TestExpectations:
+
2019-06-12 Antti Koivisto <[email protected]>
(Async scrolling) Handle 'position:fixed' inside 'position:sticky' correctly.
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (246368 => 246369)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2019-06-12 18:40:56 UTC (rev 246368)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2019-06-12 19:06:16 UTC (rev 246369)
@@ -920,12 +920,6 @@
webkit.org/b/196376 storage/domstorage/localstorage/private-browsing-affects-storage.html [ Pass Failure ]
-webkit.org/b/197917 [ Debug ] http/wpt/webauthn/public-key-credential-create-success-hid.https.html [ Skip ]
-webkit.org/b/197917 [ Debug ] http/wpt/webauthn/public-key-credential-get-success-hid.https.html [ Skip ]
-
-webkit.org/b/194780 http/wpt/webauthn/public-key-credential-create-success-hid.https.html [ Pass Failure ]
-webkit.org/b/196377 http/wpt/webauthn/public-key-credential-get-success-hid.https.html [ Pass Failure ]
-
webkit.org/b/196400 fast/mediastream/MediaStreamTrack-getSettings.html [ Pass Failure ]
webkit.org/b/196403 imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-stop.html [ Pass Failure ]
Modified: trunk/Source/WebKit/ChangeLog (246368 => 246369)
--- trunk/Source/WebKit/ChangeLog 2019-06-12 18:40:56 UTC (rev 246368)
+++ trunk/Source/WebKit/ChangeLog 2019-06-12 19:06:16 UTC (rev 246369)
@@ -1,3 +1,21 @@
+2019-06-12 Jiewen Tan <[email protected]>
+
+ REGRESSION (r245043) [Mac WK2 Debug] ASSERTION FAILED: m_services.isEmpty() && transports.size() <= maxTransportNumber seen with two http/wpt/webauthn/public-key-credential-* tests
+ https://bugs.webkit.org/show_bug.cgi?id=197917
+ <rdar://problem/51524958>
+
+ Reviewed by Brent Fulgham.
+
+ 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.
+ Therefore, when the new request starts discovery, it will still see previous request's state.
+
+ To fix this issue, clearState() will be called unconditionally for every request. And a guard is added to clearState() to prevent double clearance.
+
+ * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
+ (WebKit::AuthenticatorManager::makeCredential):
+ (WebKit::AuthenticatorManager::getAssertion):
+ (WebKit::AuthenticatorManager::clearState):
+
2019-06-12 Brent Fulgham <[email protected]>
Add mechanism and test case to check if ITP is active
Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp (246368 => 246369)
--- trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp 2019-06-12 18:40:56 UTC (rev 246368)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp 2019-06-12 19:06:16 UTC (rev 246369)
@@ -130,9 +130,9 @@
if (m_pendingCompletionHandler) {
m_pendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by a new request."_s });
- clearState();
m_requestTimeOutTimer.stop();
}
+ clearState();
// 1. Save request for async operations.
m_pendingRequestData = { hash, true, options, { } };
@@ -149,9 +149,9 @@
if (m_pendingCompletionHandler) {
m_pendingCompletionHandler(ExceptionData { NotAllowedError, "This request has been cancelled by a new request."_s });
- clearState();
m_requestTimeOutTimer.stop();
}
+ clearState();
// 1. Save request for async operations.
m_pendingRequestData = { hash, false, { }, options };
@@ -174,8 +174,9 @@
void AuthenticatorManager::clearState()
{
+ if (m_pendingCompletionHandler)
+ return;
m_pendingRequestData = { };
- ASSERT(!m_pendingCompletionHandler);
m_services.clear();
m_authenticators.clear();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes