Closed Bug 1697800 Opened 3 years ago Closed 3 years ago

webrtcUI.getActiveStreams should not throw during tab closing

Categories

(Firefox :: Site Permissions, task, P1)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 file)

If I fix bug 1596165, the browser_devices_get_user_media_multi_process.js test fails with this error:
TEST-UNEXPECTED-FAIL | browser/base/content/test/webrtc/browser_devices_get_user_media_multi_process.js | Uncaught exception - undefined - threw exception: TypeError: can't access property "ownerGlobal", browser is null

The problem is that the test does this:

      BrowserTestUtils.removeTab(tab);

      // Check that we still show the sharing indicators for the first tab's stream.
      await Promise.all([
        TestUtils.waitForCondition(() => !webrtcUI.showCameraIndicator),
        TestUtils.waitForCondition(
          () => webrtcUI.getActiveStreams(true, true, true).length == 1
        ),
      ]);

The first webrtcUI.getActiveStreams call happens at a time when the browser has already been destroyed, but the stream list hasn't been updated yet (the notification hasn't been processed yet).

Severity: -- → N/A
Priority: -- → P1
Pushed by fqueze@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6aa593ee8002
webrtcUI.getActiveStreams should not throw during tab closing, r=johannh.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: