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 // Test fast-path for String.split("").
3 load(libdir + 'eqArrayHelper.js');
5 assertEqArray("".split(""), []);
6 assertEqArray("a".split(""), ["a"]);
7 assertEqArray("abc".split(""), ["a", "b", "c"]);
9 assertEqArray("abcd".split("", 2), ["a", "b"]);
10 assertEqArray("abcd".split("", 0), []);
11 assertEqArray("abcd".split("", -1), ["a", "b", "c", "d"]);
13 // Note: V8 disagrees about this one, but we are correct by ecma-262 15.5.4.14 part 9.
14 assertEqArray("abcd".split(undefined, 0), []);
16 assertEqArray("abcd".split(undefined, 1), ["abcd"]);