remove toString code to avoid any future accidental implicit conversions
This commit is contained in:
parent
6dc697071e
commit
e9980c1558
13
pdf.js
13
pdf.js
@ -5,7 +5,6 @@ var ERRORS = 0, WARNINGS = 1, TODOS = 5;
|
|||||||
var verbosity = WARNINGS;
|
var verbosity = WARNINGS;
|
||||||
|
|
||||||
function log(msg) {
|
function log(msg) {
|
||||||
msg = msg.toString ? msg.toString() : msg;
|
|
||||||
if (console && console.log)
|
if (console && console.log)
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
else if (print)
|
else if (print)
|
||||||
@ -523,9 +522,6 @@ var Name = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor.prototype = {
|
constructor.prototype = {
|
||||||
toString: function() {
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return constructor;
|
return constructor;
|
||||||
@ -537,9 +533,6 @@ var Cmd = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constructor.prototype = {
|
constructor.prototype = {
|
||||||
toString: function() {
|
|
||||||
return this.cmd;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return constructor;
|
return constructor;
|
||||||
@ -566,12 +559,6 @@ var Dict = (function() {
|
|||||||
forEach: function(aCallback) {
|
forEach: function(aCallback) {
|
||||||
for (var key in this.map)
|
for (var key in this.map)
|
||||||
aCallback(key, this.map[key]);
|
aCallback(key, this.map[key]);
|
||||||
},
|
|
||||||
toString: function() {
|
|
||||||
var keys = [];
|
|
||||||
for (var key in this.map)
|
|
||||||
keys.push(key);
|
|
||||||
return "Dict with " + keys.length + " keys: " + keys;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user