/js/src/jit-test/tests/debug/Debugger-debuggees-10.js

http://github.com/zpao/v8monkey · JavaScript · 18 lines · 14 code · 2 blank · 2 comment · 0 complexity · bd279790f5cc8d31af9735932d30c22b MD5 · raw file

  1. // Allow diamonds in the graph of the compartment "debugs" relation.
  2. var program = newGlobal('new-compartment');
  3. var d1 = newGlobal('new-compartment');
  4. d1.top = this;
  5. var d2 = newGlobal('new-compartment');
  6. d2.top = this;
  7. var dbg = new Debugger(d1, d2);
  8. d1.eval("var dbg = new Debugger(top.program)");
  9. d2.eval("var dbg = new Debugger(top.program)");
  10. // mess with the edges a little bit -- all this should be fine, no cycles
  11. d1.dbg.removeDebuggee(program);
  12. d1.dbg.addDebuggee(program);
  13. dbg.addDebuggee(program);
  14. d1.dbg.addDebuggee(d2);
  15. dbg.removeDebuggee(d2);
  16. dbg.addDebuggee(d2);