Closed Bug 1644848 Opened 4 years ago Closed 4 years ago

avoid Promise contructor anti-pattern in wpt event RTCPeerConnection-helper.js to surface errors.

Categories

(Core :: WebRTC, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox-esr78 --- fixed
firefox79 --- fixed

People

(Reporter: jib, Assigned: jib)

References

Details

Attachments

(1 file)

We're seeing some TIMEOUTs in RTCRtpReceiver-getSynchronizationSources.https.html in windows 7 debug builds.

It looks something may be failing in our implementation, but the failure may be covered up as a timeout in the listenForSSRCs helper:

function listenForSSRCs(t, receiver) {
  return new Promise((resolve) => {
    function listen() {
=>    const ssrcs = receiver.getSynchronizationSources(); // throws?
=>    assert_true(ssrcs != undefined); // throws?
      if (ssrcs.length > 0) {
        resolve(ssrcs);
        return;
      }
      t.step_timeout(listen, 0);
    };
    listen();
  });
}

setTimeout has terrible error-handling characteristics, so these should be rewritten to avoid the Promise constructor anti-pattern to better surface errors in the test harness.

(In reply to Jan-Ivar Bruaroey [:jib] (needinfo? me) from comment #0)

We're seeing some TIMEOUTs in RTCRtpReceiver-getSynchronizationSources.https.html in windows 7 debug builds.

Or rather we were seeing timeouts before the main thread rescheduling, which is what the above link is, i.e. unexpected PASS:

The [task 2020-06-10T11:31:54.373Z] 11:31:54 INFO - TEST-UNEXPECTED-PASS | /webrtc/RTCRtpReceiver-getSynchronizationSources.https.html | [audio] getSynchronizationSources() eventually returns a non-empty list - expected TIMEOUT

Pushed by jbruaroey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ab4006856bdc
avoid Promise contructor anti-pattern in event RTCPeerConnection-helper.js to surface errors to harness. r=ng,bwc
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/24138 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Regressions: 1645679
Flags: needinfo?(jib)
Regressions: 1645626
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: