/js/src/jit-test/tests/jaeger/bug563000/trap-self-as-parent.js
http://github.com/zpao/v8monkey · JavaScript · 19 lines · 15 code · 2 blank · 2 comment · 2 complexity · 8777c63fc64b1637861ad70a44a6968e MD5 · raw file
- // |jit-test| debug
- setDebug(true);
- x = "notset";
- function myparent(nested) {
- if (nested) {
- /* noop call in myparent */
- trap(myparent, 48, "success()");
- } else {
- myparent(true);
- x = "failure";
- noop();
- }
- }
- function noop() { }
- function success() { x = "success"; }
- myparent();
- assertEq(x, "success");