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 function run_test() {
2 var Cu = Components.utils;
4 var handler = {
5 get: function(target, name){
6 return name in target?
7 target[name] :
8 37;
9 }
10 };
12 var p = new Proxy({}, handler);
13 do_check_true(Cu.isProxy(p));
14 do_check_false(Cu.isProxy({}));
15 do_check_false(Cu.isProxy(42));
17 sb = new Cu.Sandbox(this,
18 { wantExportHelpers: true });
20 do_check_false(Cu.isProxy(sb));
22 sb.do_check_true = do_check_true;
23 sb.do_check_false = do_check_false;
24 sb.p = p;
25 Cu.evalInSandbox('do_check_true(isProxy(p));' +
26 'do_check_false(isProxy({}));' +
27 'do_check_false(isProxy(42));',
28 sb);
29 }