[Pkg-mozext-commits] [adblock-plus] 38/464: remove constructors from the top-level functions list
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:00 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 99115035ef73b97a2faa738024b385d8ff21347a
Author: Andrew Sutherland <asutherland at asutherland.org>
Date: Mon Jun 22 11:17:29 2009 -0700
remove constructors from the top-level functions list
--HG--
extra : transplant_source : %5CVAt%24P%8C%A19%ADx%3C%E7%A1%AB%5C%AF%96%E1R
---
utils/cleanast.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/utils/cleanast.js b/utils/cleanast.js
index 16306d9..e3f02d8 100644
--- a/utils/cleanast.js
+++ b/utils/cleanast.js
@@ -107,7 +107,7 @@ function prototype_assign(statement) {
function make_class(class_root) {
let clazz = {};
-
+
class_root = class_root.kids[0];
let lhs = class_root.kids[0], rhs = class_root.kids[1];
if (lhs.atom == "prototype") {
@@ -127,7 +127,8 @@ function merge_class(info_list, obj) {
for (let i = 0; i < info_list.functions.length; i++) {
if (info_list.functions[i].name == name) {
obj.constructor = info_list.functions[i];
- // XXX: remove from info_list
+ // remove the constructor from the list of global functions
+ info_list.functions.splice(i, 1);
break;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list