Bug 844671 - Only sync remote tabs to non-private windows. r=gavin a=lsblakk
authorJosh Matthews <josh@joshmatthews.net>
Fri, 01 Mar 2013 09:14:49 -0500
changeset 132288 c38206da16d5286363fd8afb0087a5297328c130
parent 132287 c510ca6982d7b5d493d64f5266cf1e11d54146cd
child 132289 4ade964d1f6fcd33ccd2d7dbc67f5bae180188db
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, lsblakk
bugs844671
milestone21.0a2
Bug 844671 - Only sync remote tabs to non-private windows. r=gavin a=lsblakk
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1580,17 +1580,17 @@ BrowserGlue.prototype = {
    * Eventually, this will likely be replaced by a more robust tab syncing
    * feature. This functionality is considered somewhat evil by UX because it
    * opens a new tab automatically without any prompting. However, it is a
    * lesser evil than sending a tab to a specific device (from e.g. Fennec)
    * and having nothing happen on the receiving end.
    */
   _onDisplaySyncURI: function _onDisplaySyncURI(data) {
     try {
-      let tabbrowser = this.getMostRecentBrowserWindow().gBrowser;
+      let tabbrowser = RecentWindow.getMostRecentBrowserWindow({private: false}).gBrowser;
 
       // The payload is wrapped weirdly because of how Sync does notifications.
       tabbrowser.addTab(data.wrappedJSObject.object.uri);
     } catch (ex) {
       Cu.reportError("Error displaying tab received by Sync: " + ex);
     }
   },
 #endif