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 | /* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
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 | //----------------------------------------------------------------------------- |
michael@0 | 8 | var BUGNUMBER = 531682; |
michael@0 | 9 | var summary = 'Checking proper wrapping of scope in eval(source, scope)'; |
michael@0 | 10 | var actual; |
michael@0 | 11 | var expect; |
michael@0 | 12 | |
michael@0 | 13 | //----------------------------------------------------------------------------- |
michael@0 | 14 | var x = 0; |
michael@0 | 15 | |
michael@0 | 16 | test(); |
michael@0 | 17 | //----------------------------------------------------------------------------- |
michael@0 | 18 | |
michael@0 | 19 | function scope1() { |
michael@0 | 20 | eval('var x = 1;'); |
michael@0 | 21 | return function() { return x; } |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | function test() { |
michael@0 | 25 | enterFunc ('test'); |
michael@0 | 26 | printBugNumber(BUGNUMBER); |
michael@0 | 27 | printStatus (summary); |
michael@0 | 28 | |
michael@0 | 29 | // The scope chain in eval should be just scope1() and the global object. |
michael@0 | 30 | actual = eval('x', scope1()); |
michael@0 | 31 | expect = 0; |
michael@0 | 32 | reportCompare(expect, actual, summary); |
michael@0 | 33 | exitFunc ('test'); |
michael@0 | 34 | } |