From 4ea8f31301642a5e51e17f6a8c2f409ca3b71f3c Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Tue, 21 Oct 2014 18:23:17 -0700 Subject: [PATCH] Fix scrolling of tabs on Firefox 36 --- modules/browser.js | 7 +++++-- modules/lib/autoScroll.js | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/browser.js b/modules/browser.js index e91ddae0..35b50a31 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -165,8 +165,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { var node = this.scrollBox; if (node._scrollbox) node = node._scrollbox; - return (node.scrollBoxObject || node.boxObject) - .QueryInterface(Ci.nsIScrollBoxObject); // for Tab Mix Plus (ensure scrollbox-ed) + var boxObject = (node.scrollBoxObject || node.boxObject); + try { + boxObject = boxObject.QueryInterface(Ci.nsIScrollBoxObject); // for Tab Mix Plus (ensure scrollbox-ed) + } catch (ex) { /* May not implement this interface e.g. after bug 979835 */ } + return boxObject; }, get splitter() diff --git a/modules/lib/autoScroll.js b/modules/lib/autoScroll.js index 44009f34..acc81606 100644 --- a/modules/lib/autoScroll.js +++ b/modules/lib/autoScroll.js @@ -164,8 +164,11 @@ if (typeof window == 'undefined' || getScrollBoxObject : function(aTabBrowser) { var box = this.getScrollBox(aTabBrowser); - return (box.scrollBoxObject || box.boxObject) - .QueryInterface(Ci.nsIScrollBoxObject); // Tab Mix Plus + var boxObject = (box.scrollBoxObject || box.boxObject); + try { + boxObject = boxObject.QueryInterface(Ci.nsIScrollBoxObject); // for Tab Mix Plus (ensure scrollbox-ed) + } catch (ex) { /* May not implement this interface e.g. after bug 979835 */ } + return boxObject; }, getUpButton : function(aTabBrowser)