mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
Bug 1612724 - Part 2: Use NotifyWhenScriptSafe for MediaManager notifications, r=jib
Differential Revision: https://phabricator.services.mozilla.com/D61601 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
185c260183
commit
148a71bcbc
@ -527,7 +527,7 @@ class GetUserMediaWindowListener {
|
||||
auto req = MakeRefPtr<GetUserMediaRequest>(
|
||||
globalWindow, VoidString(), VoidString(),
|
||||
UserActivation::IsHandlingUserInput());
|
||||
obs->NotifyObservers(req, "recording-device-stopped", nullptr);
|
||||
obs->NotifyWhenScriptSafe(req, "recording-device-stopped", nullptr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -589,7 +589,7 @@ class GetUserMediaWindowListener {
|
||||
auto req = MakeRefPtr<GetUserMediaRequest>(
|
||||
window, removedRawId, removedSourceType,
|
||||
UserActivation::IsHandlingUserInput());
|
||||
obs->NotifyObservers(req, "recording-device-stopped", nullptr);
|
||||
obs->NotifyWhenScriptSafe(req, "recording-device-stopped", nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -616,7 +616,7 @@ class GetUserMediaWindowListener {
|
||||
auto req = MakeRefPtr<GetUserMediaRequest>(
|
||||
window, removedRawId, removedSourceType,
|
||||
UserActivation::IsHandlingUserInput());
|
||||
obs->NotifyObservers(req, "recording-device-stopped", nullptr);
|
||||
obs->NotifyWhenScriptSafe(req, "recording-device-stopped", nullptr);
|
||||
}
|
||||
}
|
||||
if (mInactiveListeners.Length() == 0 && mActiveListeners.Length() == 0) {
|
||||
@ -3407,7 +3407,7 @@ void MediaManager::RemoveWindowID(uint64_t aWindowId) {
|
||||
nsString data = NS_ConvertUTF8toUTF16(windowBuffer);
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
||||
obs->NotifyObservers(nullptr, "recording-window-ended", data.get());
|
||||
obs->NotifyWhenScriptSafe(nullptr, "recording-window-ended", data.get());
|
||||
LOG("Sent recording-window-ended for window %" PRIu64 " (outer %" PRIu64 ")",
|
||||
aWindowId, outerID);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user