author | Panos Astithas <past@mozilla.com> |
Thu, 23 Jan 2014 09:20:07 +0200 | |
changeset 164914 | 2882840b841a2594cac954a86935309d12dc81da |
parent 164801 | 4200ecc6b162a660a687473ccaf2f8e20f47b689 |
child 164915 | 445a480ba7d1e63af08091d0e1661b9c44c4b578 |
push id | 26066 |
push user | ryanvm@gmail.com |
push date | Thu, 23 Jan 2014 20:56:18 +0000 |
treeherder | mozilla-central@066c526104ef [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | fitzgen |
bugs | 962632 |
milestone | 29.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/toolkit/devtools/server/actors/webbrowser.js +++ b/toolkit/devtools/server/actors/webbrowser.js @@ -885,36 +885,34 @@ BrowserTabActor.prototype = { /** * Handle location changes, by clearing the previous debuggees and enabling * debugging, which may have been disabled temporarily by the * DebuggerProgressListener. */ onWindowCreated: makeInfallible(function BTA_onWindowCreated(evt) { - if (evt.target === this.browser.contentDocument) { - // pageshow events for non-persisted pages have already been handled by a - // prior DOMWindowCreated event. - if (evt.type == "pageshow" && !evt.persisted) { - return; - } - if (this._attached) { - this.threadActor.clearDebuggees(); - if (this.threadActor.dbg) { - this.threadActor.dbg.enabled = true; - this.threadActor.maybePauseOnExceptions(); - } + // pageshow events for non-persisted pages have already been handled by a + // prior DOMWindowCreated event. + if (!this._attached || (evt.type == "pageshow" && !evt.persisted)) { + return; + } + if (evt.target === this.browser.contentDocument ) { + this.threadActor.clearDebuggees(); + if (this.threadActor.dbg) { + this.threadActor.dbg.enabled = true; + this.threadActor.global = evt.target.defaultView.wrappedJSObject; + this.threadActor.maybePauseOnExceptions(); } } - if (this._attached) { - this.threadActor.global = evt.target.defaultView.wrappedJSObject; - if (this.threadActor.attached) { - this.threadActor.findGlobals(); - } + // Refresh the debuggee list when a new window object appears (top window or + // iframe). + if (this.threadActor.attached) { + this.threadActor.findGlobals(); } }, "BrowserTabActor.prototype.onWindowCreated"), /** * Tells if the window.console object is native or overwritten by script in * the page. * * @param nsIDOMWindow aWindow