From dbe477fc8e4883d9c0b97a30e01888b700f90769 Mon Sep 17 00:00:00 2001 From: Taneli Leppa Date: Tue, 1 Jul 2014 10:48:06 +0300 Subject: [PATCH] Exit current isolate on fatal V8 error. --- v8js.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/v8js.cc b/v8js.cc index 050d84b..1e23a46 100644 --- a/v8js.cc +++ b/v8js.cc @@ -747,6 +747,10 @@ static int _php_v8js_create_ext_strarr(const char ***retval, int count, HashTabl static void php_v8js_fatal_error_handler(const char *location, const char *message) /* {{{ */ { + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + if (isolate) { + isolate->Exit(); + } if (location) { zend_error(E_ERROR, "%s %s", location, message); } else {