Bug 1022202 - Fix uncaught nsIScrollBoxObject.ensureElementIsVisible promise rejections in the netmonitor tests, r=dcamp

This commit is contained in:
Victor Porof 2014-06-12 12:16:58 -04:00
Родитель 475bb7bb3a
Коммит b158940d17
2 изменённых файлов: 14 добавлений и 1 удалений

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

@ -223,6 +223,14 @@ let NetMonitorController = {
this.webConsoleClient = null;
},
/**
* Checks whether the netmonitor connection is active.
* @return boolean
*/
isConnected: function() {
return !!this.client;
},
/**
* Sets up a monitoring session.
*

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

@ -1980,6 +1980,8 @@ NetworkDetailsView.prototype = {
*/
destroy: function() {
dumpn("Destroying the NetworkDetailsView");
$("tabpanels", this.widget).removeEventListener("select", this._onTabSelect);
},
/**
@ -2068,7 +2070,10 @@ NetworkDetailsView.prototype = {
}
populated[tab] = true;
window.emit(EVENTS.TAB_UPDATED);
NetMonitorView.RequestsMenu.ensureSelectedItemIsVisible();
if (NetMonitorController.isConnected()) {
NetMonitorView.RequestsMenu.ensureSelectedItemIsVisible();
}
});
},