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 /*
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
4 */
6 var BUGNUMBER = 518103;
7 var summary = 'partial flat closures must not reach across funargs';
8 var actual = "no crash";
9 var expect = actual;
11 function Timer(){}
12 Timer.prototype = { initWithCallback: function (o) {Timer.q.push(o)} };
13 Timer.q = [];
15 var later;
16 var ac = {startSearch: function(q,s,n,o){later=o}};
18 var bm = {insertBookmark: function(){}, getIdForItemAt: function(){}};
20 function run_test() {
21 var tagIds = [];
23 (function doSearch(query) {
24 ac.startSearch(query, "", null, {
25 onSearchResult: function() {
26 var num = tagIds.length;
28 var timer = new Timer;
29 var next = query.slice(1);
30 timer.initWithCallback({ notify: function() doSearch(next) });
31 }
32 });
33 })("title");
34 }
36 run_test();
37 later.onSearchResult();
38 for (var i in Timer.q)
39 Timer.q[i].notify();
41 reportCompare(expect, actual, summary);