RESOLVED DUPLICATE of bug 68171 64525
MediaStream API: Release script objects when detaching document
https://bugs.webkit.org/show_bug.cgi?id=64525
Summary MediaStream API: Release script objects when detaching document
Henrik Grunell
Reported 2011-07-14 05:54:40 PDT
We need to release the clients held by MediaStreamFrameController when a document is detached since they are not valid for the new document. A specific problem that this solves: a LocalMediaStream object should stop [it's generation of media] when a web page is reloaded. This is not the case today, meaning that a camera capture device will be blocked until the garbage collector has deleted the old document (which would in turn delete and stop the MediaStream objects).
Attachments
Patch (4.14 KB, patch)
2011-07-15 01:08 PDT, Henrik Grunell
tonyg: review-
Henrik Grunell
Comment 1 2011-07-15 01:08:40 PDT
Tony Gentilcore
Comment 2 2011-07-15 02:32:23 PDT
Comment on attachment 100945 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=100945&action=review r- for lack of test > Source/WebCore/ChangeLog:10 > + No new tests because the patch is just a bug fix. In WebKit, fixing a bug is usually a great reason to add a test. This is the sort of edge case that could easily break during future refactoring, so please add a test so we don't regress here. > Source/WebCore/dom/Document.cpp:1778 > + if (mediaStreamFrameController) If you prefer, a common idiom in WebKit is: if (MediaStreamFrameController* mediaStreamFrameController = m_frame->mediaStreamFrameController()) mediaStreamFrameController->clearAllClients();
John Knottenbelt
Comment 3 2011-07-15 05:44:18 PDT
Comment on attachment 100945 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=100945&action=review >> Source/WebCore/ChangeLog:10 >> + No new tests because the patch is just a bug fix. > > In WebKit, fixing a bug is usually a great reason to add a test. This is the sort of edge case that could easily break during future refactoring, so please add a test so we don't regress here. Check out LayoutTests/fast/dom/Geolocation/page-reload-cancel-permission-requests.html for a possible way to do a test involving a reload.
Henrik Grunell
Comment 4 2011-09-15 23:59:22 PDT
The MediaStream object handling will be rewritten in bug 68171, and that change shall ensure that the issue described in this bug is resolved. *** This bug has been marked as a duplicate of bug 68171 ***
Note You need to log in before you can comment on or make changes to this bug.