/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

  1. // |jit-test| debug
  2. setDebug(true);
  3. x = "notset";
  4. function myparent(nested) {
  5. if (nested) {
  6. /* noop call in myparent */
  7. trap(myparent, 48, "success()");
  8. } else {
  9. myparent(true);
  10. x = "failure";
  11. noop();
  12. }
  13. }
  14. function noop() { }
  15. function success() { x = "success"; }
  16. myparent();
  17. assertEq(x, "success");