mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 682758 - Stop repr() trying to call match() on an empty Array. r=mdas
This commit is contained in:
parent
645ee9b6d4
commit
f41ce961ab
@ -33,8 +33,6 @@ if (parentRunner) {
|
||||
}
|
||||
|
||||
/* Helper functions pulled out of various MochiKit modules */
|
||||
var reprRegistry = [];
|
||||
|
||||
if (typeof(repr) == 'undefined') {
|
||||
function repr(o) {
|
||||
if (typeof(o) == "undefined") {
|
||||
@ -48,17 +46,16 @@ if (typeof(repr) == 'undefined') {
|
||||
} else if (typeof(o.repr) == 'function' && o.repr != arguments.callee) {
|
||||
return o.repr();
|
||||
}
|
||||
return reprRegistry.match(o);
|
||||
} catch (e) {
|
||||
try {
|
||||
if (typeof(o.NAME) == 'string' && (
|
||||
o.toString == Function.prototype.toString ||
|
||||
o.toString == Object.prototype.toString
|
||||
)) {
|
||||
return o.NAME;
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
if (typeof(o.NAME) == 'string' && (
|
||||
o.toString == Function.prototype.toString ||
|
||||
o.toString == Object.prototype.toString
|
||||
)) {
|
||||
return o.NAME;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
var ostring = (o + "");
|
||||
|
Loading…
Reference in New Issue
Block a user