Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/tests/qunit.js

Issue 8450003: Reimplemented whitelist handling (Closed)
Patch Set: Created Sept. 25, 2012, 3:48 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld