Passing test: .apply works on function proxies.
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 05 May 2011 16:26:43 -0500
changeset 74413 18e81fe5abac6810c744012e1236b41a5b83dbbd
parent 74412 012541acc62a95c78dcbd6549f91f52b3ea29db0
child 74414 4af0f2c61f899e432eb9ddb5d05267a5c1dfe729
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
milestone6.0a1
Passing test: .apply works on function proxies.
js/src/jit-test/tests/debug/Object-apply-04.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/debug/Object-apply-04.js
@@ -0,0 +1,17 @@
+// |jit-test| debug
+// Debug.Object.prototype.apply works with function proxies
+
+var g = newGlobal('new-compartment');
+g.eval("function f() { debugger; }");
+var dbg = Debug(g);
+var hits = 0;
+dbg.hooks = {
+    debuggerHandler: function (frame) {
+        var proxy = frame.arguments[0];
+        assertEq(proxy.name, null);
+        assertEq(proxy.apply(null, [33]).return, 34);
+        hits++;
+    }
+};
+g.eval("f(Proxy.createFunction({}, function (arg) { return arg + 1; }));");
+assertEq(hits, 1);