Bug 1302702 - Check if the threadActor is attached before using it in tab actor's _windowReady. r=ochameau

MozReview-Commit-ID: IexaXRL27Lu

--HG--
extra : rebase_source : d3a9b2062b876b073970fe8ab919e1240eaadcbf
This commit is contained in:
Luca Greco 2017-05-11 18:54:26 +02:00
parent 61ddf5427f
commit beacbd1f6a

View File

@ -1168,6 +1168,12 @@ TabActor.prototype = {
this._setWindow(window);
DevToolsUtils.executeSoon(() => {
// No need to do anything more if the actor is not attached anymore
// e.g. the client has been closed and the actors destroyed in the meantime.
if (!this.attached) {
return;
}
// Then fake window-ready and navigate on the given document
this._windowReady(window, true);
DevToolsUtils.executeSoon(() => {