On 12/13/13 9:59 AM, Andreas Schlegel wrote:
> Hello Jason,
>
> can you explain me the followin test case of the JIT-Tests:
> self-test/assertDeepEq.js:
>
> // cross-compartment
> var g1 = newGlobal(), g2 = newGlobal();
> assertDeepEq(g1, g2);
>
> This test fails, but I don't know why.

(copying this to the JS internals list)

I don't know why either. Two new global objects should be equal.

Does it fail with an error message?

> What kind of comparism is this?

Structural equivalence. To pass, the two arguments must either be === to
each other, or be two different objects with the same class, the same
properties in the same order, structurally-equivalent property
values/getters/setters, and structurally-equivalent prototypes. As a
special case, functions are not considered structurally-equivalent
unless they additionally have the same source code.

And off I go to check in a comment that says all that. *sheepish look*

This function is implemented here:

http://dxr.mozilla.org/mozilla-central/source/js/src/tests/ecma_6/shell.js#91

-j

_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to