| Index: chrome/content/tests/qunit.js |
| =================================================================== |
| --- a/chrome/content/tests/qunit.js |
| +++ b/chrome/content/tests/qunit.js |
| @@ -1320,26 +1320,31 @@ QUnit.equiv = (function() { |
| "object": function( b, a ) { |
| var i, j, loop, |
| // Default to true |
| eq = true, |
| aProperties = [], |
| bProperties = []; |
| + /***************** |
| + * HACK: Disable this code, it won't do well when comparing objects |
| + * from different scopes (different prototypes). |
| + |
| // comparing constructors is more strict than using |
| // instanceof |
| if ( a.constructor !== b.constructor ) { |
| // Allow objects with no prototype to be equivalent to |
| // objects with Object as their constructor. |
| if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) || |
| ( getProto(b) === null && getProto(a) === Object.prototype ) ) ) { |
| return false; |
| } |
| } |
| + *****************/ |
| // stack constructor before traversing properties |
| callers.push( a.constructor ); |
| // track reference to avoid circular references |
| parents.push( a ); |
| for ( i in a ) { // be strict: don't ensures hasOwnProperty |
| // and go deep |