Loading browser/base/content/test/webrtc/browser_devices_get_user_media_in_frame.js +7 −7 Original line number Diff line number Diff line Loading @@ -130,15 +130,15 @@ var gTests = [ { desc: "getUserMedia audio+video: reloading a frame updates the sharing UI", run: async function checkUpdateWhenReloading() { // We'll share only the mic in the first frame, then share both in the // We'll share only the cam in the first frame, then share both in the // second frame, then reload the second frame. After each step, we'll check // the UI is in the correct state. let promise = promisePopupNotificationShown("webRTC-shareDevices"); await promiseRequestDevice(true, false, "frame1"); await promiseRequestDevice(false, true, "frame1"); await promise; await expectObserverCalled("getUserMedia:request"); checkDeviceSelectors(true, false); checkDeviceSelectors(false, true); let indicator = promiseIndicatorWindow(); await promiseMessage("ok", () => { Loading @@ -146,11 +146,11 @@ var gTests = [ }); await expectObserverCalled("getUserMedia:response:allow"); await expectObserverCalled("recording-device-events"); Assert.deepEqual((await getMediaCaptureState()), {audio: true}, "expected microphone to be shared"); Assert.deepEqual((await getMediaCaptureState()), {video: true}, "expected camera to be shared"); await indicator; await checkSharingUI({video: false, audio: true}); await checkSharingUI({video: true, audio: false}); await expectNoObserverCalled(); promise = promisePopupNotificationShown("webRTC-shareDevices"); Loading @@ -176,7 +176,7 @@ var gTests = [ await promise; await expectObserverCalled("recording-window-ended"); await checkSharingUI({video: false, audio: true}); await checkSharingUI({video: true, audio: false}); await expectNoObserverCalled(); await closeStream(false, "frame1"); Loading dom/ipc/TabParent.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ TabParent::TabParent(nsIContentParent* aManager, , mInitedByParent(false) , mTabId(aTabId) , mCreatingWindow(false) , mCursor(nsCursor(-1)) , mCursor(eCursorInvalid) , mTabSetsCursor(false) , mHasContentOpener(false) #ifdef DEBUG Loading Loading @@ -1131,7 +1131,7 @@ TabParent::SendRealMouseEvent(WidgetMouseEvent& aEvent) if (mCustomCursor) { widget->SetCursor(mCustomCursor, mCustomCursorHotspotX, mCustomCursorHotspotY); } else if (mCursor != nsCursor(-1)) { } else if (mCursor != eCursorInvalid) { widget->SetCursor(mCursor); } } else if (eMouseExitFromWidget == aEvent.mMessage) { Loading Loading @@ -1787,7 +1787,7 @@ TabParent::RecvSetCustomCursor(const nsCString& aCursorData, const uint32_t& aHotspotY, const bool& aForce) { mCursor = nsCursor(-1); mCursor = eCursorInvalid; nsCOMPtr<nsIWidget> widget = GetWidget(); if (widget) { Loading dom/media/MediaManager.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -1232,10 +1232,15 @@ public: self->mSourceListener->GetPrincipalHandle()); if (NS_FAILED(rv)) { nsString log; if (rv == NS_ERROR_NOT_AVAILABLE) { log.AssignASCII("Concurrent mic process limit."); error = new MediaMgrError(NS_LITERAL_STRING("NotReadableError"), log); } else { log.AssignASCII("Starting audio failed"); error = new MediaMgrError(NS_LITERAL_STRING("InternalError"), log); } } } if (!error && self->mVideoDevice) { nsresult rv = Loading dom/media/webrtc/MediaEngineWebRTCAudio.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -474,6 +474,13 @@ MediaEngineWebRTCMicrophoneSource::Start(SourceMediaStream *aStream, return NS_ERROR_FAILURE; } // Until we fix bug 1400488 we need to block a second tab (OuterWindow) // from opening an already-open device. If it's the same tab, they // will share a Graph(), and we can allow it. if (!mSources.IsEmpty() && aStream->Graph() != mSources[0]->Graph()) { return NS_ERROR_NOT_AVAILABLE; } { MonitorAutoLock lock(mMonitor); mSources.AppendElement(aStream); Loading dom/workers/RuntimeService.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -885,9 +885,9 @@ InitJSContextForWorker(WorkerPrivate* aWorkerPrivate, JSContext* aWorkerCx) // This is the real place where we set the max memory for the runtime. for (uint32_t index = 0; index < ArrayLength(gcSettings); index++) { const JSSettings::JSGCSetting& setting = gcSettings[index]; if (setting.IsSet()) { if (setting.key.isSome()) { NS_ASSERTION(setting.value, "Can't handle 0 values!"); JS_SetGCParameter(aWorkerCx, setting.key, setting.value); JS_SetGCParameter(aWorkerCx, *setting.key, setting.value); } } Loading Loading @@ -1935,7 +1935,7 @@ RuntimeService::Init() } // Initialize JSSettings. if (!sDefaultJSSettings.gcSettings[0].IsSet()) { if (sDefaultJSSettings.gcSettings[0].key.isNothing()) { sDefaultJSSettings.contextOptions = JS::ContextOptions(); sDefaultJSSettings.chrome.maxScriptRuntime = -1; sDefaultJSSettings.chrome.compartmentOptions.behaviors().setVersion(JSVERSION_DEFAULT); Loading Loading
browser/base/content/test/webrtc/browser_devices_get_user_media_in_frame.js +7 −7 Original line number Diff line number Diff line Loading @@ -130,15 +130,15 @@ var gTests = [ { desc: "getUserMedia audio+video: reloading a frame updates the sharing UI", run: async function checkUpdateWhenReloading() { // We'll share only the mic in the first frame, then share both in the // We'll share only the cam in the first frame, then share both in the // second frame, then reload the second frame. After each step, we'll check // the UI is in the correct state. let promise = promisePopupNotificationShown("webRTC-shareDevices"); await promiseRequestDevice(true, false, "frame1"); await promiseRequestDevice(false, true, "frame1"); await promise; await expectObserverCalled("getUserMedia:request"); checkDeviceSelectors(true, false); checkDeviceSelectors(false, true); let indicator = promiseIndicatorWindow(); await promiseMessage("ok", () => { Loading @@ -146,11 +146,11 @@ var gTests = [ }); await expectObserverCalled("getUserMedia:response:allow"); await expectObserverCalled("recording-device-events"); Assert.deepEqual((await getMediaCaptureState()), {audio: true}, "expected microphone to be shared"); Assert.deepEqual((await getMediaCaptureState()), {video: true}, "expected camera to be shared"); await indicator; await checkSharingUI({video: false, audio: true}); await checkSharingUI({video: true, audio: false}); await expectNoObserverCalled(); promise = promisePopupNotificationShown("webRTC-shareDevices"); Loading @@ -176,7 +176,7 @@ var gTests = [ await promise; await expectObserverCalled("recording-window-ended"); await checkSharingUI({video: false, audio: true}); await checkSharingUI({video: true, audio: false}); await expectNoObserverCalled(); await closeStream(false, "frame1"); Loading
dom/ipc/TabParent.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ TabParent::TabParent(nsIContentParent* aManager, , mInitedByParent(false) , mTabId(aTabId) , mCreatingWindow(false) , mCursor(nsCursor(-1)) , mCursor(eCursorInvalid) , mTabSetsCursor(false) , mHasContentOpener(false) #ifdef DEBUG Loading Loading @@ -1131,7 +1131,7 @@ TabParent::SendRealMouseEvent(WidgetMouseEvent& aEvent) if (mCustomCursor) { widget->SetCursor(mCustomCursor, mCustomCursorHotspotX, mCustomCursorHotspotY); } else if (mCursor != nsCursor(-1)) { } else if (mCursor != eCursorInvalid) { widget->SetCursor(mCursor); } } else if (eMouseExitFromWidget == aEvent.mMessage) { Loading Loading @@ -1787,7 +1787,7 @@ TabParent::RecvSetCustomCursor(const nsCString& aCursorData, const uint32_t& aHotspotY, const bool& aForce) { mCursor = nsCursor(-1); mCursor = eCursorInvalid; nsCOMPtr<nsIWidget> widget = GetWidget(); if (widget) { Loading
dom/media/MediaManager.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -1232,10 +1232,15 @@ public: self->mSourceListener->GetPrincipalHandle()); if (NS_FAILED(rv)) { nsString log; if (rv == NS_ERROR_NOT_AVAILABLE) { log.AssignASCII("Concurrent mic process limit."); error = new MediaMgrError(NS_LITERAL_STRING("NotReadableError"), log); } else { log.AssignASCII("Starting audio failed"); error = new MediaMgrError(NS_LITERAL_STRING("InternalError"), log); } } } if (!error && self->mVideoDevice) { nsresult rv = Loading
dom/media/webrtc/MediaEngineWebRTCAudio.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -474,6 +474,13 @@ MediaEngineWebRTCMicrophoneSource::Start(SourceMediaStream *aStream, return NS_ERROR_FAILURE; } // Until we fix bug 1400488 we need to block a second tab (OuterWindow) // from opening an already-open device. If it's the same tab, they // will share a Graph(), and we can allow it. if (!mSources.IsEmpty() && aStream->Graph() != mSources[0]->Graph()) { return NS_ERROR_NOT_AVAILABLE; } { MonitorAutoLock lock(mMonitor); mSources.AppendElement(aStream); Loading
dom/workers/RuntimeService.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -885,9 +885,9 @@ InitJSContextForWorker(WorkerPrivate* aWorkerPrivate, JSContext* aWorkerCx) // This is the real place where we set the max memory for the runtime. for (uint32_t index = 0; index < ArrayLength(gcSettings); index++) { const JSSettings::JSGCSetting& setting = gcSettings[index]; if (setting.IsSet()) { if (setting.key.isSome()) { NS_ASSERTION(setting.value, "Can't handle 0 values!"); JS_SetGCParameter(aWorkerCx, setting.key, setting.value); JS_SetGCParameter(aWorkerCx, *setting.key, setting.value); } } Loading Loading @@ -1935,7 +1935,7 @@ RuntimeService::Init() } // Initialize JSSettings. if (!sDefaultJSSettings.gcSettings[0].IsSet()) { if (sDefaultJSSettings.gcSettings[0].key.isNothing()) { sDefaultJSSettings.contextOptions = JS::ContextOptions(); sDefaultJSSettings.chrome.maxScriptRuntime = -1; sDefaultJSSettings.chrome.compartmentOptions.behaviors().setVersion(JSVERSION_DEFAULT); Loading