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 function trySetProperty(o, p, v, strict) {
2 function strictSetProperty() {
3 "use strict";
4 o[p] = v;
5 }
6 try {
7 strictSetProperty();
8 } catch (e) {
9 return "throw";
10 }
11 }
13 //var objs = [[0], [1]];
14 var objs = [{a: 0}, {a: 1}];
16 for (var i = 0, sz = objs.length; i < sz; i++) {
17 var o = objs[i];
18 var o2 = Object.preventExtensions(o);
19 print(i +' ' + o);
20 assertEq(trySetProperty(o, "baz", 17, true), "throw", "object " + i);
21 }