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 "abcdefg".match(/(x)y(z)/g);
2 assertEq(RegExp.$1, "");
4 assertEq("abcdef".match(/a(b)cd/g)[0], "abcd");
5 assertEq(RegExp.$1, "b");
6 assertEq(RegExp.$2, "");
8 "abcdef".match(/(a)b(c)/g);
9 assertEq(RegExp.$1, "a");
10 assertEq(RegExp.$2, "c");
11 assertEq(RegExp.$3, "");
13 "abcabdabe".match(/(a)b(.)/g);
14 assertEq(RegExp.$1, "a");
15 assertEq(RegExp.$2, "e");
17 "abcdefg".match(/(x)y(z)/g);
18 assertEq(RegExp.$1, "a"); //If there's no match, we don't update the statics.
20 "abcdefg".match(/(g)/g);
21 assertEq(RegExp.$1, "g");