зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1157995 - Tell the cycle collector about Navigator::mMediaDevices. r=smaug
This commit is contained in:
Родитель
01b6eb2526
Коммит
b63ced61a3
|
@ -201,6 +201,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator)
|
|||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mAudioChannelManager)
|
||||
#endif
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCameraManager)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaDevices)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMessagesManager)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDeviceStorageStores)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTimeManager)
|
||||
|
@ -307,6 +308,7 @@ Navigator::Invalidate()
|
|||
#endif
|
||||
|
||||
mCameraManager = nullptr;
|
||||
mMediaDevices = nullptr;
|
||||
|
||||
if (mMessagesManager) {
|
||||
mMessagesManager = nullptr;
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<script>
|
||||
// This should not leak.
|
||||
var a = navigator;
|
||||
navigator.mediaDevices._ = null;
|
||||
</script>
|
||||
</body>
|
|
@ -202,3 +202,4 @@ load xhr_empty_datauri.html
|
|||
load xhr_html_nullresponse.html
|
||||
load structured_clone_container_throws.html
|
||||
load 1154598.xhtml
|
||||
load 1157995.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче