WebKit Bugzilla
Attachment 348328 Details for
Bug 189021
: MediaDevices should be collectable as soon as its document is stopped
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-189021-20180828131410.patch (text/plain), 3.61 KB, created by
youenn fablet
on 2018-08-28 13:14:11 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-08-28 13:14:11 PDT
Size:
3.61 KB
patch
obsolete
>Subversion Revision: 235427 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 825fbe2c0e1f53961733fbebfcdd3ad31b5f785a..191c2418196b6aa99f702a420b96938ba73d4516 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-08-28 Youenn Fablet <youenn@apple.com> >+ >+ MediaDevices should be collectable as soon as its document is stopped >+ https://bugs.webkit.org/show_bug.cgi?id=189021 >+ >+ Reviewed by Eric Carlson. >+ >+ 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: >+ > 2018-08-27 Youenn Fablet <youenn@apple.com> > > Remove WebRTC legacy API implementation >diff --git a/Source/WebCore/Modules/mediastream/MediaDevices.cpp b/Source/WebCore/Modules/mediastream/MediaDevices.cpp >index 5c0f538e62dbf155b21ce9615109934dc04e006d..d9b0bb775ae877c9b2415aff0850953ef9d3d146 100644 >--- a/Source/WebCore/Modules/mediastream/MediaDevices.cpp >+++ b/Source/WebCore/Modules/mediastream/MediaDevices.cpp >@@ -162,7 +162,7 @@ void MediaDevices::scheduledEventTimerFired() > > bool MediaDevices::hasPendingActivity() const > { >- return scriptExecutionContext() && hasEventListeners(m_eventNames.devicechangeEvent); >+ return !isContextStopped() && hasEventListeners(m_eventNames.devicechangeEvent); > } > > const char* MediaDevices::activeDOMObjectName() const >diff --git a/Source/WebCore/dom/ActiveDOMObject.cpp b/Source/WebCore/dom/ActiveDOMObject.cpp >index b81a884c40ffa26c9d55726b040f900c38e5e885..a4392f077da3f603006fe85836ba75b6a065dd60 100644 >--- a/Source/WebCore/dom/ActiveDOMObject.cpp >+++ b/Source/WebCore/dom/ActiveDOMObject.cpp >@@ -106,4 +106,9 @@ void ActiveDOMObject::stop() > { > } > >+bool ActiveDOMObject::isContextStopped() const >+{ >+ return !scriptExecutionContext() || scriptExecutionContext()->activeDOMObjectsAreStopped(); >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/dom/ActiveDOMObject.h b/Source/WebCore/dom/ActiveDOMObject.h >index ce1ec5726f6d9f67aa152d67c32a6c7f58864f9c..360ad21489adbd5fecbb817680df4b9e8f789e74 100644 >--- a/Source/WebCore/dom/ActiveDOMObject.h >+++ b/Source/WebCore/dom/ActiveDOMObject.h >@@ -110,6 +110,8 @@ public: > return adoptRef(*new PendingActivity<T>(thisObject)); > } > >+ bool isContextStopped() const; >+ > protected: > explicit ActiveDOMObject(ScriptExecutionContext*); > virtual ~ActiveDOMObject(); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 0e67aeeabf893d28e55fa7ff4452e36cf7524a31..1b16d98644de27517a0c3492e994bcb49b193806 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-08-28 Youenn Fablet <youenn@apple.com> >+ >+ MediaDevices should be collectable as soon as its document is stopped >+ https://bugs.webkit.org/show_bug.cgi?id=189021 >+ >+ Reviewed by Eric Carlson. >+ >+ * 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. >+ > 2018-08-27 Youenn Fablet <youenn@apple.com> > > Remove WebRTC legacy API implementation
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189021
:
348223
|
348247
|
348251
|
348255
|
348256
|
348302
| 348328