[Pkg-mozext-commits] [greasemonkey] 52/62: Merge remote-tracking branch 'janekptacijarabaci/GM_openInTab_closable_reopenable'

David Prévot taffit at moszumanska.debian.org
Sun Sep 13 22:10:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 277cc71326fed2ad4b390daa9fb2ebaee9ad080d
Merge: 47fac82 924fee2
Author: Anthony Lieuallen <arantius at gmail.com>
Date:   Mon Aug 31 14:21:45 2015 -0400

    Merge remote-tracking branch 'janekptacijarabaci/GM_openInTab_closable_reopenable'
    
    # Conflicts:
    #	content/browser.js

 content/browser.js | 43 +++++++++++++++++++++----------------------
 1 file changed, 21 insertions(+), 22 deletions(-)

diff --cc content/browser.js
index 3e0824d,79ebdd3..eeb80ac
--- a/content/browser.js
+++ b/content/browser.js
@@@ -70,28 -70,26 +70,27 @@@ GM_BrowserUI.openInTab = function(aMess
    var tabBrowser = browser.getTabBrowser();
    var scriptTab = tabBrowser.getTabForBrowser(browser);
    var scriptTabIsCurrentTab = scriptTab == tabBrowser.mCurrentTab;
-   var newTab = tabBrowser.addTab(
-       aMessage.data.url,
-       {
-           'ownerTab': scriptTab,
-           'relatedToCurrent': scriptTabIsCurrentTab,
-       });
- 
-   var getBool = Services.prefs.getBoolPref;
- 
-   var prefBg = (aMessage.data.inBackground === null)
-       ? getBool("browser.tabs.loadInBackground")
-       : aMessage.data.inBackground;
-   if (scriptTabIsCurrentTab && !prefBg) tabBrowser.selectedTab = newTab;
- 
-   var prefRel = (aMessage.data.afterCurrent === null)
-       ? getBool("browser.tabs.insertRelatedAfterCurrent")
-       : aMessage.data.afterCurrent;
-   if (prefRel) {
-     tabBrowser.moveTabTo(newTab, scriptTab._tPos + 1);
-   } else {
-     tabBrowser.moveTabTo(newTab, tabBrowser.tabs.length - 1);  
-   }
++  // Work around a race condition in Firefox code with E10S disabled.
+   // See #2107 and #2234
 -  // Tabs created by GM_openInTab don't end up in the "last closed tabs lists" when closed
 -  // Tabs opened with GM_openInTab can not be closed
++  // Todo: Remove timeout when http://bugzil.la/1200334 is resolved.
+   GM_util.timeout(function () {
+     var newTab = tabBrowser.addTab(
+         aMessage.data.url,
+         {
+             'ownerTab': scriptTab,
+             'relatedToCurrent': scriptTabIsCurrentTab,
+         });
+ 
+     var getBool = Services.prefs.getBoolPref;
+ 
 -    var prefBg = getBool('browser.tabs.loadInBackground');
 -    prefBg |= aMessage.data.inBackground;
++    var prefBg = (aMessage.data.inBackground === null)
++        ? getBool("browser.tabs.loadInBackground")
++        : aMessage.data.inBackground;
+     if (scriptTabIsCurrentTab && !prefBg) tabBrowser.selectedTab = newTab;
+ 
+     var prefRel = getBool('browser.tabs.insertRelatedAfterCurrent');
+     if (prefRel) tabBrowser.moveTabTo(newTab, scriptTab._tPos + 1);
+   }, 0);
  };
  
  /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list