fix tools/domprops.json is not mixed in reserved, when use API option Mangle properties

This commit is contained in:
yangweixian 2017-11-26 22:20:52 +08:00
parent b37a68c84f
commit aa63540975
2 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,7 @@ function find_builtins(reserved) {
Object.getOwnPropertyNames(ctor.prototype).map(add); Object.getOwnPropertyNames(ctor.prototype).map(add);
} }
}); });
domprops.forEach(add);
function add(name) { function add(name) {
push_uniq(reserved, name); push_uniq(reserved, name);
} }

View File

@ -23,6 +23,7 @@ new Function("MOZ_SourceMap", "exports", function() {
return fs.readFileSync(file, "utf8"); return fs.readFileSync(file, "utf8");
}); });
code.push("exports.describe_ast = " + describe_ast.toString()); code.push("exports.describe_ast = " + describe_ast.toString());
code.push(";var domprops = " + JSON.stringify(require("./domprops.json")));
return code.join("\n\n"); return code.join("\n\n");
}())( }())(
require("source-map"), require("source-map"),