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