js/src/jit-test/tests/basic/spread-call-not-iterable.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 load(libdir + "asserts.js");
michael@0 2 load(libdir + "iteration.js");
michael@0 3
michael@0 4 assertThrowsInstanceOf(() => Math.sin(...true), TypeError);
michael@0 5 assertThrowsInstanceOf(() => Math.sin(...false), TypeError);
michael@0 6 assertThrowsInstanceOf(() => Math.sin(...new Date()), TypeError);
michael@0 7 assertThrowsInstanceOf(() => Math.sin(...Function("")), TypeError);
michael@0 8 assertThrowsInstanceOf(() => Math.sin(...function () {}), TypeError);
michael@0 9 assertThrowsInstanceOf(() => Math.sin(...(x => x)), TypeError);
michael@0 10 assertThrowsInstanceOf(() => Math.sin(...1), TypeError);
michael@0 11 assertThrowsInstanceOf(() => Math.sin(...{}), TypeError);
michael@0 12 var foo = {}
michael@0 13
michael@0 14 foo[std_iterator] = 10;
michael@0 15 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
michael@0 16
michael@0 17 foo[std_iterator] = function() undefined;
michael@0 18 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
michael@0 19
michael@0 20 foo[std_iterator] = function() this;
michael@0 21 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
michael@0 22
michael@0 23 foo[std_iterator] = function() this;
michael@0 24 foo.next = function() { throw 10; };
michael@0 25 assertThrowsValue(() => Math.sin(...foo), 10);
michael@0 26
michael@0 27 assertThrowsInstanceOf(() => Math.sin(.../a/), TypeError);
michael@0 28 assertThrowsInstanceOf(() => Math.sin(...new Error()), TypeError);

mercurial