js/src/jit-test/tests/jaeger/recompile/flush.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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
michael@0 2 /* Handle flushing of scripted call ICs pointing to recompiled functions. */
michael@0 3
michael@0 4 function add(x, y) {
michael@0 5 var z = x + y;
michael@0 6 return String(x + y);
michael@0 7 }
michael@0 8
michael@0 9 function foo() {
michael@0 10 var x = 0x7ffffff0;
michael@0 11 var res = "";
michael@0 12 for (var i = 0; i < 20; i++) {
michael@0 13 res += add(x, i) + ",";
michael@0 14 res += add(x, i) + ",";
michael@0 15 }
michael@0 16 assertEq(res, "2147483632,2147483632,2147483633,2147483633,2147483634,2147483634,2147483635,2147483635,2147483636,2147483636,2147483637,2147483637,2147483638,2147483638,2147483639,2147483639,2147483640,2147483640,2147483641,2147483641,2147483642,2147483642,2147483643,2147483643,2147483644,2147483644,2147483645,2147483645,2147483646,2147483646,2147483647,2147483647,2147483648,2147483648,2147483649,2147483649,2147483650,2147483650,2147483651,2147483651,");
michael@0 17 }
michael@0 18 foo();

mercurial