Bug 1150200 - QI the docShell to an nsIWebNavigation before sending canGoForward or canGoBackward in browser-child.js. r=ttaubert.

This commit is contained in:
Mike Conley 2015-04-01 17:20:09 -04:00
parent 597677c826
commit 2980b71796

View File

@ -132,8 +132,9 @@ let WebProgressListener = {
json.flags = aFlags;
// These properties can change even for a sub-frame navigation.
json.canGoBack = docShell.canGoBack;
json.canGoForward = docShell.canGoForward;
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
json.canGoBack = webNav.canGoBack;
json.canGoForward = webNav.canGoForward;
if (aWebProgress && aWebProgress.isTopLevel) {
json.documentURI = content.document.documentURIObject.spec;