js/src/jit-test/tests/for-of/next-3.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 // Iterators from another compartment work with their own .next method
     2 // when called from another compartment, but not with the other
     3 // compartment's .next method.
     5 // FIXME: 'next' should work cross-realm.  Bug 924059.
     7 load(libdir + "asserts.js");
     8 load(libdir + "iteration.js");
    10 var g = newGlobal();
    11 g.eval("var it = [1, 2]['" + std_iterator + "']();");
    12 assertIteratorNext(g.it, 1);
    13 assertThrowsInstanceOf([][std_iterator]().next.bind(g.it), TypeError)

mercurial