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 // defineProperty throws if a getter or setter is neither undefined nor callable.
3 load(libdir + "asserts.js");
5 var g = newGlobal();
6 var dbg = new Debugger;
7 var gw = dbg.addDebuggee(g);
9 for (let v of [null, false, 'bad', 0, 2.76, {}]) {
10 assertThrowsInstanceOf(function () {
11 gw.defineProperty("p", {configurable: true, get: v});
12 }, TypeError);
13 assertThrowsInstanceOf(function () {
14 gw.defineProperty("p", {configurable: true, set: v});
15 }, TypeError);
16 }