# HG changeset patch # User Myk Melez # Date 1224885684 25200 # Node ID 398b9ca0264b9641babd59fab95fde9b68242fae # Parent 1bbcbc4d95d216420d601e9d5833d05604b21dcf when updating the URI in the river view, make sure we update the river document's URI rather than the URI for the current tab, since the river view might not be the current tab on startup diff -r 1bbcbc4d95d2 -r 398b9ca0264b content/river.js --- a/content/river.js Fri Oct 24 14:14:12 2008 -0700 +++ b/content/river.js Fri Oct 24 15:01:24 2008 -0700 @@ -447,14 +447,9 @@ if (this._periodMenu.selectedItem && this._periodMenu.selectedItem.value != "all") params.push("period=" + encodeURIComponent(this._periodMenu.selectedItem.value)); - let gBrowserWindow = window.QueryInterface(Ci.nsIInterfaceRequestor). - getInterface(Ci.nsIWebNavigation). - QueryInterface(Ci.nsIDocShellTreeItem). - rootTreeItem. - QueryInterface(Ci.nsIInterfaceRequestor). - getInterface(Ci.nsIDOMWindow); + let browser = gBrowserWindow.gBrowser.getBrowserForDocument(document); - let currentURI = gBrowserWindow.gBrowser.docShell.currentURI.QueryInterface(Ci.nsIURL); + let currentURI = browser.docShell.currentURI.QueryInterface(Ci.nsIURL); let query = params.length > 0 ? "?" + params.join("&") : ""; let spec = currentURI.prePath + currentURI.filePath + query; @@ -464,11 +459,11 @@ // Update the docshell with the new URI. This updates the location bar // and gets used by the bookmarks service when the user bookmarks the page. - gBrowserWindow.gBrowser.docShell.setCurrentURI(uri); + browser.docShell.setCurrentURI(uri); // Update the session history entry for the page with the new URI. // This gets used when the user reloads the page or traverses history. - let history = gBrowserWindow.gBrowser.sessionHistory; + let history = browser.sessionHistory; let historyEntry = history.getEntryAtIndex(history.index, false); if (historyEntry instanceof Ci.nsISHEntry) historyEntry.setURI(uri);