Skip to content
  • Nicolas Chevobbe's avatar
    Bug 1660466 - Fix attaching target/thread test intermittents. r=jdescottes, a=RyanVM · 7c81f0a2
    Nicolas Chevobbe authored
    Move the function taking care of closing the Browser Console to shared-head so
    we can close it before closing the tabs opened during the test.
    
    While attaching the worker, check that the Worker Debugger isn't closed, and
    if it is, reject the promise. On the target list, catch rejection while attaching
    and simply bail out so we don't call the rest of the code in onTargetAvailable.
    
    Those guards are not enough to prevent any failure while attaching, so we're
    wrapping calls to `attachAndInitThread`/`_onThreadInitialized` in try/catch
    blocks to avoid test failures.
    
    Differential Revision: https://phabricator.services.mozilla.com/D88766
    7c81f0a2