Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | load(libdir + 'array-compare.js'); |
michael@0 | 2 | |
michael@0 | 3 | var g = newGlobal(); |
michael@0 | 4 | var dbg = new Debugger(g); |
michael@0 | 5 | var hits = 0; |
michael@0 | 6 | dbg.onDebuggerStatement = function (frame) { |
michael@0 | 7 | var arr = frame.arguments; |
michael@0 | 8 | assertEq(arraysEqual(arr[0].parameterNames, []), true); |
michael@0 | 9 | assertEq(arraysEqual(arr[1].parameterNames, ["x"]), true); |
michael@0 | 10 | assertEq(arraysEqual(arr[2].parameterNames, |
michael@0 | 11 | ["a","b","c","d","e","f","g","h","i","j","k","l","m", |
michael@0 | 12 | "n","o","p","q","r","s","t","u","v","w","x","y","z"]), |
michael@0 | 13 | true); |
michael@0 | 14 | assertEq(arraysEqual(arr[3].parameterNames, ["a", (void 0), (void 0)]), true); |
michael@0 | 15 | assertEq(arr[4].parameterNames, (void 0)); |
michael@0 | 16 | assertEq(arraysEqual(arr[5].parameterNames, [(void 0), (void 0)]), true); |
michael@0 | 17 | assertEq(arr.length, 6); |
michael@0 | 18 | hits++; |
michael@0 | 19 | }; |
michael@0 | 20 | |
michael@0 | 21 | g.eval("(" |
michael@0 | 22 | + function () { |
michael@0 | 23 | (function () { debugger; } |
michael@0 | 24 | (function () {}, |
michael@0 | 25 | function (x) {}, |
michael@0 | 26 | function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) {}, |
michael@0 | 27 | function (a, [b, c], {d, e:f}) { }, |
michael@0 | 28 | {a:1}, |
michael@0 | 29 | Math.atan2 |
michael@0 | 30 | )); |
michael@0 | 31 | } |
michael@0 | 32 | +")()"); |
michael@0 | 33 | assertEq(hits, 1); |