diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-02-03 09:04:23 -0500 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-02-03 09:04:23 -0500 |
commit | 4a09c97eb1dd5db2d300e17bde15bd88563616f9 (patch) | |
tree | 6740816302e4123d1083df55f3708617c84f0ce7 /common/modules/base.jsm | |
parent | 346cf2531a86b075074ecde7f3f25c6c24e14f0c (diff) | |
download | pentadactyl-4a09c97eb1dd5db2d300e17bde15bd88563616f9.tar.gz |
More lazy instantiation. Look out for breakage.
Diffstat (limited to 'common/modules/base.jsm')
-rw-r--r-- | common/modules/base.jsm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/modules/base.jsm b/common/modules/base.jsm index 92f8655a..020fbbb5 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -147,6 +147,9 @@ defineModule.modules = []; defineModule.times = { all: 0 }; defineModule.time = function time(major, minor, func, self) { let time = Date.now(); + if (typeof func !== "function") + func = self[func]; + try { var res = func.apply(self, Array.slice(arguments, 4)); } |