Don't pollute String.prototype. bug 330976, r=brendan

This commit is contained in:
mrbkap%gmail.com 2006-03-20 20:15:15 +00:00
Родитель 6b23cf6277
Коммит 4edd0845fc
1 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -290,12 +290,16 @@ Np.getSource = function () {
Np.__defineGetter__('filename',
function () { return this.tokenizer.filename; });
String.prototype.repeat = function (n) {
var s = "", t = this + s;
while (--n >= 0)
s += t;
return s;
}
String.prototype.__defineProperty__(
'repeat',
function (n) {
var s = "", t = this + s;
while (--n >= 0)
s += t;
return s;
},
false, false, true
);
// Statement stack and nested statement handler.
function nest(t, x, node, func, end) {