You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MediaDevices should be collectable as soon as its document is stopped
https://bugs.webkit.org/show_bug.cgi?id=189021
Reviewed by Eric Carlson.
Source/WebCore:
Introduce ActiveDOMObject::isContextStopped to check whether the context is stopped.
Use this check in MediaDevices::hasPendingActivity so that it returns false as soon as active dom objects are stopped.
Test: http/tests/media/collect-media-devices.https.html
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::hasPendingActivity const):
* dom/ActiveDOMObject.cpp:
(WebCore::ActiveDOMObject::hasPendingActivity const):
(WebCore::ActiveDOMObject::isContextStopped const):
* dom/ActiveDOMObject.h:
LayoutTests:
* http/tests/media/media-stream/collect-media-devices.https-expected.txt: Added.
* http/tests/media/media-stream/collect-media-devices.https.html: Added.
* http/tests/media/media-stream/resources/mymediadevicesframe.htm: Added.
Canonical link: https://commits.webkit.org/204092@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0 commit comments