webkitGetUserMedia-shadowing-then.html sometimes triggers an assertion while enumerating the request map.
Created attachment 270927 [details] Proposed patch.
<rdar://problem/24065022>
Created attachment 270929 [details] Updated patch.
Comment on attachment 270929 [details] Updated patch. View in context: https://bugs.webkit.org/attachment.cgi?id=270929&action=review r=me > Source/WebKit/mac/WebCoreSupport/WebUserMediaClient.mm:118 > + ASSERT(userMediaRequestsMap().isEmpty()); These assertions seem kind of silly after calling clear, and they could be right after the call to clear, unless you are actually asserting that the map is still empty after calling cancelUserMediaAccessRequest on each request that used to be in the map.
Comment on attachment 270929 [details] Updated patch. View in context: https://bugs.webkit.org/attachment.cgi?id=270929&action=review >> Source/WebKit/mac/WebCoreSupport/WebUserMediaClient.mm:118 >> + ASSERT(userMediaRequestsMap().isEmpty()); > > These assertions seem kind of silly after calling clear, and they could be right after the call to clear, unless you are actually asserting that the map is still empty after calling cancelUserMediaAccessRequest on each request that used to be in the map. That is the idea, assert that the map is still empty after cancelling the requests to ensure that no new ones were added. This isn't currently possible, but if a future change enabled JS to run it could be.
Committed r196310: https://trac.webkit.org/r196310