Browse Source

Restore clean unwind state after unwinding.

Stefan Siegl 10 years ago
parent
commit
47b433efe8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      v8js.cc

+ 3 - 0
v8js.cc

@@ -1256,6 +1256,9 @@ static void php_v8js_execute_script(zval *this_ptr, php_v8js_script *res, long f
 	/* Check for fatal error marker possibly set by php_v8js_error_handler; just
 	/* Check for fatal error marker possibly set by php_v8js_error_handler; just
 	 * rethrow the error since we're now out of V8. */
 	 * rethrow the error since we're now out of V8. */
 	if(V8JSG(fatal_error_abort)) {
 	if(V8JSG(fatal_error_abort)) {
+		V8JSG(fatal_error_abort) = 0;
+		V8JSG(unwind_env) = NULL;
+
 		zend_error(V8JSG(error_num), "%s", V8JSG(error_message));
 		zend_error(V8JSG(error_num), "%s", V8JSG(error_message));
 	}
 	}