Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 // Test that we can save stacks with getter and setter function frames.
3 function assertStackLengthEq(stack, expectedLength) {
4 let actual = 0;
5 while (stack) {
6 actual++;
7 stack = stack.parent;
8 }
9 assertEq(actual, expectedLength);
10 }
12 const get = { get s() { return saveStack(); } }.s;
13 assertStackLengthEq(get, 2);
15 let set;
16 try {
17 ({
18 set s(v) {
19 throw saveStack();
20 }
21 }).s = 1;
22 } catch (s) {
23 set = s;
24 }
25 assertStackLengthEq(set, 2);