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 JSON = function () {
2 return {
3 stringify: function stringify(value, whitelist) {
4 switch (typeof(value)) {
5 case "object":
6 return value.constructor.name;
7 }
8 }
9 };
10 }();
12 function missingArgTest2() {
13 var testPairs = [
14 ["{}", {}],
15 ["[]", []],
16 ['{"foo":"bar"}', {"foo":"bar"}],
17 ]
19 var a = [];
20 for (var i=0; i < testPairs.length; i++) {
21 var s = JSON.stringify(testPairs[i][1])
22 a[i] = s;
23 }
24 return a.join(",");
25 }
26 assertEq(missingArgTest2(), "Object,Array,Object");