diff options
Diffstat (limited to 'common/modules/base.jsm')
-rw-r--r-- | common/modules/base.jsm | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/common/modules/base.jsm b/common/modules/base.jsm index 36088c93..6dce9d58 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -216,9 +216,9 @@ function require(obj, name, from, targetName) { } defineModule("base", { - // sed -n 's/^(const|function) ([a-zA-Z0-9_]+).*/ "\2",/p' base.jsm | sort | fmt + // sed -n 's/^(const|var|function) ([a-zA-Z0-9_]+).*/ "\2",/p' base.jsm | sort | fmt exports: [ - "ErrorBase", "Cc", "Ci", "Class", "Cr", "Cu", "Module", "JSMLoader", "Object", "Runnable", + "ErrorBase", "Cc", "Ci", "Class", "Cr", "Cu", "Module", "JSMLoader", "Object", "Set", "Struct", "StructBase", "Timer", "UTF8", "XPCOM", "XPCOMShim", "XPCOMUtils", "XPCSafeJSObjectWrapper", "array", "bind", "call", "callable", "ctypes", "curry", "debuggerProperties", "defineModule", "deprecated", "endModule", "forEach", "isArray", @@ -228,14 +228,6 @@ defineModule("base", { ] }, this); -function Runnable(self, func, args) { - return { - __proto__: Runnable.prototype, - run: function () { func.apply(self, args || []); } - }; -} -Runnable.prototype.QueryInterface = XPCOMUtils.generateQI([Ci.nsIRunnable]); - /** * Returns a list of all of the top-level properties of an object, by * way of the debugger. @@ -845,7 +837,7 @@ Class.extend = function extend(subclass, superclass, overrides) { * property's value. * @returns {Class.Property} */ -Class.Memoize = Class.Memoize = function Memoize(getter, wait) +Class.Memoize = function Memoize(getter, wait) Class.Property({ configurable: true, enumerable: true, @@ -887,6 +879,8 @@ Class.Memoize = Class.Memoize = function Memoize(getter, wait) } }); +Class.memoize = deprecated("Class.Memoize", function memoize() Class.Memoize.apply(this, arguments)); + /** * Updates the given object with the object in the target class's * prototype. @@ -1184,7 +1178,7 @@ function Struct() { }); return Struct; } -let StructBase = Class("StructBase", Array, { +var StructBase = Class("StructBase", Array, { init: function struct_init() { for (let i = 0; i < arguments.length; i++) if (arguments[i] != undefined) |