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 | // |reftest| skip-if(!xulRuntime.shell) |
michael@0 | 2 | |
michael@0 | 3 | // Any copyright is dedicated to the Public Domain. |
michael@0 | 4 | // http://creativecommons.org/licenses/publicdomain/ |
michael@0 | 5 | |
michael@0 | 6 | //----------------------------------------------------------------------------- |
michael@0 | 7 | var BUGNUMBER = 822041; |
michael@0 | 8 | var summary = "Live generators should not cache SPS state"; |
michael@0 | 9 | |
michael@0 | 10 | print(BUGNUMBER + ": " + summary); |
michael@0 | 11 | |
michael@0 | 12 | function gen() { |
michael@0 | 13 | var x = yield turnoff(); |
michael@0 | 14 | yield x; |
michael@0 | 15 | yield 'bye'; |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | function turnoff() { |
michael@0 | 19 | print("Turning off profiler\n"); |
michael@0 | 20 | disableSPSProfiling(); |
michael@0 | 21 | return 'hi'; |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | for (var slowAsserts of [ true, false ]) { |
michael@0 | 25 | // The slowAssertions setting is not expected to matter |
michael@0 | 26 | enableSPSProfilingAssertions(slowAsserts); |
michael@0 | 27 | |
michael@0 | 28 | g = gen(); |
michael@0 | 29 | assertEq(g.next(), 'hi'); |
michael@0 | 30 | assertEq(g.send('gurgitating...'), 'gurgitating...'); |
michael@0 | 31 | for (var x in g) |
michael@0 | 32 | assertEq(x, 'bye'); |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | // This is really a crashtest |
michael@0 | 36 | reportCompare(0, 0, 'ok'); |