[webkit-changes] [WebKit/WebKit] a2555e: REGRESSION (276119 at main): [ macOS iOS ] http/tests...

Sihui noreply at github.com
Sun Mar 24 22:14:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a2555ef76ee7191c3726a000a635c285704e355a
      https://github.com/WebKit/WebKit/commit/a2555ef76ee7191c3726a000a635c285704e355a
  Author: Sihui Liu <sihui_liu at apple.com>
  Date:   2024-03-24 (Sun, 24 Mar 2024)

  Changed paths:
    M LayoutTests/http/tests/navigation/page-cache-getUserMedia-pending-promise-expected.txt
    M LayoutTests/http/tests/navigation/page-cache-getUserMedia-pending-promise.html
    M Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp

  Log Message:
  -----------
  REGRESSION (276119 at main): [ macOS iOS ] http/tests/navigation/page-cache-getUserMedia-pending-promise.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=271063
rdar://problem/124698382

Reviewed by Chris Dumez.

In existing implementation, when main document of page changes (e.g. due to reload or navigation), we invalidate all
existing media permission requests and clear cache (UserMediaPermissionRequestManagerProxy::resetAccess). However, the
invalidation (UserMediaPermissionRequestProxy::invalidate) does not include sending backing request result to web
process, so the Promise of getUserMedia() may never finish (since web process finishes it when receiving result from
UI process).

This causes trouble to the failed test, as it invokes getUserMedia(), immediately navigates away to a new link (main
document changes), then navigates back to the previous page (page restored from page cache) and waits for the Promise
returned by getUserMedia() to finish. To fix this issue, now UserMediaPermissionRequestManagerProxy::resetAccess calls
UserMediaPermissionRequestProxy::deny instead of UserMediaPermissionRequestProxy::invalidate.

* LayoutTests/http/tests/navigation/page-cache-getUserMedia-pending-promise-expected.txt:
* LayoutTests/http/tests/navigation/page-cache-getUserMedia-pending-promise.html:
* Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::resetAccess):

Canonical link: https://commits.webkit.org/276618@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list