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.
michael@0 | 1 | // mapiter.next() returns an actual array. |
michael@0 | 2 | |
michael@0 | 3 | load(libdir + "iteration.js"); |
michael@0 | 4 | |
michael@0 | 5 | var key = {}; |
michael@0 | 6 | var map = Map([[key, 'value']]); |
michael@0 | 7 | var entry = map[std_iterator]().next().value; |
michael@0 | 8 | assertEq(Array.isArray(entry), true); |
michael@0 | 9 | assertEq(Object.getPrototypeOf(entry), Array.prototype); |
michael@0 | 10 | assertEq(Object.isExtensible(entry), true); |
michael@0 | 11 | |
michael@0 | 12 | assertEq(entry.length, 2); |
michael@0 | 13 | var names = Object.getOwnPropertyNames(entry).sort(); |
michael@0 | 14 | assertEq(names.length, 3); |
michael@0 | 15 | assertEq(names.join(","), "0,1,length"); |
michael@0 | 16 | assertEq(entry[0], key); |
michael@0 | 17 | assertEq(entry[1], 'value'); |