Bug 1073584 - timeline.js: support root actor. r=pbrosset

This commit is contained in:
Paul Rouget 2014-10-28 02:21:00 -04:00
parent f4b757cbb2
commit 17db3086d4

View File

@ -116,7 +116,15 @@ let TimelineActor = exports.TimelineActor = protocol.ActorClass({
* @return {Array}
*/
get docShells() {
let docShellsEnum = this.tabActor.originalDocShell.getDocShellEnumerator(
let originalDocShell;
if (this.tabActor.isRootActor) {
originalDocShell = this.tabActor.docShell;
} else {
originalDocShell = this.tabActor.originalDocShell;
}
let docShellsEnum = originalDocShell.getDocShellEnumerator(
Ci.nsIDocShellTreeItem.typeAll,
Ci.nsIDocShell.ENUMERATE_FORWARDS
);