Bug 1539979 - Initialize browser-loader only after domready in toolbox.js;r=bgrins

Depends on D26319

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julian Descottes 2019-04-10 01:04:38 +00:00
Родитель 85ba25b7cc
Коммит 5768a84395
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -449,11 +449,6 @@ Toolbox.prototype = {
*/
open: function() {
return (async function() {
this.browserRequire = BrowserLoader({
window: this.doc.defaultView,
useOnlyShared: true,
}).require;
const isToolboxURL = this.win.location.href.startsWith(this._URL);
if (isToolboxURL) {
// Update the URL so that onceDOMReady watch for the right url.
@ -493,6 +488,11 @@ Toolbox.prototype = {
this._threadClient = await attachThread(this);
await domReady;
this.browserRequire = BrowserLoader({
window: this.win,
useOnlyShared: true,
}).require;
// The web console is immediately loaded when replaying, so that the
// timeline will always be populated with generated messages.
if (this.target.isReplayEnabled()) {