Bug 1497470 - Improve error logging when the browser content toolbox fails loading. r=yulia

MozReview-Commit-ID: 2QJfxOMmmOl

Depends on D10387

Differential Revision: https://phabricator.services.mozilla.com/D10190

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2018-11-05 15:02:19 +00:00
parent aa27526bd1
commit 871b6682e6
2 changed files with 7 additions and 0 deletions

View File

@ -358,6 +358,10 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
.then(target => {
// Display a new toolbox in a new window
return gDevTools.showToolbox(target, null, Toolbox.HostType.WINDOW);
})
.catch(e => {
console.error("Exception while opening the browser content toolbox:",
e);
});
}

View File

@ -115,6 +115,9 @@ const TargetFactory = exports.TargetFactory = {
if (targetPromise == null) {
const target = new TabTarget(options);
targetPromise = target.attach().then(() => target);
targetPromise.catch(e => {
console.error("Exception while attaching target", e);
});
promiseTargets.set(options, targetPromise);
}
return targetPromise;