Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
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)