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 |
michael@0 | 2 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 3 | /* |
michael@0 | 4 | * Any copyright is dedicated to the Public Domain. |
michael@0 | 5 | * http://creativecommons.org/licenses/publicdomain/ |
michael@0 | 6 | * Contributor: Jason Orendorff |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | //----------------------------------------------------------------------------- |
michael@0 | 10 | var BUGNUMBER = 415721; |
michael@0 | 11 | var summary = 'jsatom.c double hashing re-validation logic is unsound'; |
michael@0 | 12 | |
michael@0 | 13 | printStatus (summary); |
michael@0 | 14 | |
michael@0 | 15 | var VARS = 10000; |
michael@0 | 16 | var TRIES = 100; |
michael@0 | 17 | |
michael@0 | 18 | function atomizeStressTest() { |
michael@0 | 19 | var fn = "function f() {var "; |
michael@0 | 20 | for (var i = 0; i < VARS; i++) |
michael@0 | 21 | fn += '_f' + i + ', '; |
michael@0 | 22 | fn += 'q;}'; |
michael@0 | 23 | |
michael@0 | 24 | function e() { eval(fn); } |
michael@0 | 25 | |
michael@0 | 26 | for (var i = 0; i < TRIES; i++) { |
michael@0 | 27 | scatter([e,e]); |
michael@0 | 28 | gc(); |
michael@0 | 29 | } |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | var expect; |
michael@0 | 33 | var actual; |
michael@0 | 34 | |
michael@0 | 35 | expect = actual = 'No crash'; |
michael@0 | 36 | if (typeof scatter == 'undefined' || typeof gc == 'undefined') { |
michael@0 | 37 | print('Test skipped. scatter or gc not defined.'); |
michael@0 | 38 | expect = actual = 'Test skipped.'; |
michael@0 | 39 | } else { |
michael@0 | 40 | atomizeStressTest(); |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | reportCompare(expect, actual, summary); |
michael@0 | 44 |