fatal_error_uninstall_in_first_frame.phpt 735 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Test V8::executeString() : Fatal Error handler must be uninstalled when leaving outermost frame
  3. --SKIPIF--
  4. <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
  5. --FILE--
  6. <?php
  7. $js = new V8Js();
  8. $js->bar = function() {
  9. echo "nothing.\n";
  10. };
  11. $js->foo = function() {
  12. global $js;
  13. // call to JS context, this must not touch the error handling context
  14. $js->executeString("PHP.bar();");
  15. };
  16. $js->executeString("PHP.foo();");
  17. // V8JS handler must be removed, just throw error ...
  18. // if V8JS handler is not removed, it should trigger segfault in V8 :)
  19. $bar = null;
  20. $bar->foo();
  21. ?>
  22. ===EOF===
  23. --EXPECTF--
  24. nothing.
  25. Fatal error: Call to a member function foo() on %s in %s/fatal_error_uninstall_in_first_frame.php on line 20