From 92dd8adf82e3fbfe9c389ddad499c09e97430fd8 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Wed, 7 Sep 2016 15:53:01 +0900 Subject: [PATCH] Update library --- content/treestyletab/bookmarksOverlay.js | 2 +- .../treestyletab/bookmarksOverlayEditable.js | 2 +- modules/autoHide.js | 8 +++--- modules/base.js | 2 +- modules/bookmark.js | 2 +- modules/browser.js | 2 +- modules/contentBridge.js | 2 +- modules/fullTooltip.js | 2 +- modules/groupTab.js | 2 +- modules/lib/inherit.jsm | 26 +++++-------------- modules/window.js | 2 +- 11 files changed, 20 insertions(+), 32 deletions(-) diff --git a/content/treestyletab/bookmarksOverlay.js b/content/treestyletab/bookmarksOverlay.js index bedc2259..c110075e 100644 --- a/content/treestyletab/bookmarksOverlay.js +++ b/content/treestyletab/bookmarksOverlay.js @@ -93,7 +93,7 @@ var TreeStyleTabBookmarksUIService = inherit(TreeStyleTabService, { } } -}); +}, Object); TreeStyleTabBookmarksUIService.preInit(); diff --git a/content/treestyletab/bookmarksOverlayEditable.js b/content/treestyletab/bookmarksOverlayEditable.js index 38f89f05..766d51f1 100644 --- a/content/treestyletab/bookmarksOverlayEditable.js +++ b/content/treestyletab/bookmarksOverlayEditable.js @@ -420,7 +420,7 @@ var TreeStyleTabBookmarksServiceEditable = inherit(TreeStyleTabBookmarksUIServic } } -}); +}, Object); window.addEventListener('DOMContentLoaded', TreeStyleTabBookmarksServiceEditable, false); ReferenceCounter.add('window,DOMContentLoaded,TreeStyleTabBookmarksServiceEditable,false'); diff --git a/modules/autoHide.js b/modules/autoHide.js index 8d88e049..59709ee4 100644 --- a/modules/autoHide.js +++ b/modules/autoHide.js @@ -102,7 +102,7 @@ var AutoHideConstants = Object.freeze(inherit(TreeStyleTabConstants, { MOUSE_POSITION_INSIDE : (1 << 1), MOUSE_POSITION_NEAR : (1 << 2), MOUSE_POSITION_SENSITIVE : (1 << 1) | (1 << 2) -})); +}, Object)); function AutoHideBase(aTabBrowser) @@ -175,7 +175,7 @@ AutoHideBase.prototype = inherit(AutoHideConstants, { this.treeStyleTab.setWindowValue(this.kMODE + '-fullscreen', aValue); return aValue; } -}); +}, Object); function AutoHideBrowser(aTabBrowser) @@ -1576,7 +1576,7 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, { delete this.window; } -}); +}, Object); function AutoHideWindow(aWindow) { @@ -1766,5 +1766,5 @@ AutoHideWindow.prototype = inherit(AutoHideBase.prototype, { } } -}); +}, Object); diff --git a/modules/base.js b/modules/base.js index 6fb48a7d..fff7d4e4 100644 --- a/modules/base.js +++ b/modules/base.js @@ -2361,7 +2361,7 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, { ); } -}); +}, Object); TreeStyleTabBase.init(); diff --git a/modules/bookmark.js b/modules/bookmark.js index 9861c62e..39196b84 100644 --- a/modules/bookmark.js +++ b/modules/bookmark.js @@ -388,7 +388,7 @@ var TreeStyleTabBookmarksService = inherit(TreeStyleTabConstants, { onItemVisited : function TSTBMService_onItemVisited(aID, aHistoryID, aDate) {}, onBeginUpdateBatch : function TSTBMService_onBeginUpdateBatch() {}, onEndUpdateBatch : function TSTBMService_onEndUpdateBatch() {} -}); +}, Object); PlacesUIUtils.__treestyletab__openTabset = PlacesUIUtils._openTabset; diff --git a/modules/browser.js b/modules/browser.js index ba9a6783..fe5f4712 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -7602,5 +7602,5 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { return JSON.parse(json); } -}); +}, Object); diff --git a/modules/contentBridge.js b/modules/contentBridge.js index 8cf39850..1b633054 100644 --- a/modules/contentBridge.js +++ b/modules/contentBridge.js @@ -192,5 +192,5 @@ ContentBridge.prototype = inherit(TreeStyleTabConstants, { } return aCoordinates; } -}); +}, Object); diff --git a/modules/fullTooltip.js b/modules/fullTooltip.js index e8949391..0fe7fe92 100644 --- a/modules/fullTooltip.js +++ b/modules/fullTooltip.js @@ -671,4 +671,4 @@ FullTooltipManager.prototype = inherit(TreeStyleTabBase, { /width|height/.test(aEvent.propertyName)) this.changingPropertiesCount--; } -}); +}, Object); diff --git a/modules/groupTab.js b/modules/groupTab.js index 51d38929..67814404 100644 --- a/modules/groupTab.js +++ b/modules/groupTab.js @@ -447,4 +447,4 @@ GroupTab.prototype = inherit(TreeStyleTabBase, { this.checkUpdateTreeNow(); } -}); +}, Object); diff --git a/modules/lib/inherit.jsm b/modules/lib/inherit.jsm index cb7730e9..ed705baf 100644 --- a/modules/lib/inherit.jsm +++ b/modules/lib/inherit.jsm @@ -2,10 +2,10 @@ * @fileOverview inherit, an alternative for __proto__ * @author YUKI "Piro" Hiroshi * @contributor Infocatcher - * @version 3 + * @version 4 * * @license - * The MIT License, Copyright (c) 2014 YUKI "Piro" Hiroshi. + * The MIT License, Copyright (c) 2014-2016 YUKI "Piro" Hiroshi. * https://github.com/piroor/fxaddonlib-inherit/blob/master/LICENSE * @url http://github.com/piroor/fxaddonlib-inherit */ @@ -21,23 +21,11 @@ function toPropertyDescriptors(aProperties) { return descriptors; } -function inherit(aParent, aExtraProperties) { - var global; - if (Components.utils.getGlobalForObject) - global = Components.utils.getGlobalForObject(aParent); - else - global = aParent.valueOf.call(); - global = global || this; - - var ObjectClass = global.Object || Object; - - if (!ObjectClass.create) { - aExtraProperties = aExtraProperties || new ObjectClass; - aExtraProperties.__proto__ = aParent; - return aExtraProperties; - } +function inherit(aParent, aExtraProperties, aObjectClass) { + aObjectClass = aObjectClass || Object; if (aExtraProperties) - return ObjectClass.create(aParent, toPropertyDescriptors(aExtraProperties)); + return aObjectClass.create(aParent, toPropertyDescriptors(aExtraProperties)); else - return ObjectClass.create(aParent); + return aObjectClass.create(aParent); } + diff --git a/modules/window.js b/modules/window.js index f7c260c6..784f9196 100644 --- a/modules/window.js +++ b/modules/window.js @@ -2046,5 +2046,5 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, { } } -}); +}, Object);