1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/Object-apply-04.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +// Debugger.Object.prototype.apply/call works with function proxies 1.5 + 1.6 +var g = newGlobal(); 1.7 +g.eval("function f() { debugger; }"); 1.8 +var dbg = Debugger(g); 1.9 +var hits = 0; 1.10 +dbg.onDebuggerStatement = function (frame) { 1.11 + var proxy = frame.arguments[0]; 1.12 + assertEq(proxy.name, undefined); 1.13 + assertEq(proxy.apply(null, [33]).return, 34); 1.14 + assertEq(proxy.call(null, 33).return, 34); 1.15 + hits++; 1.16 +}; 1.17 +g.eval("f(Proxy.createFunction({}, function (arg) { return arg + 1; }));"); 1.18 +assertEq(hits, 1);