Skip to content

Commit f1e2c36

Browse files
committed
Merge remote-tracking branch 'stesie/remove-compat-exceptions' into php7
2 parents b12a2fb + 302bf1d commit f1e2c36

File tree

5 files changed

+1
-50
lines changed

5 files changed

+1
-50
lines changed

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,3 @@ objects obeying the above rules and re-thrown in JavaScript context. If they
414414
are not caught by JavaScript code the execution stops and a
415415
`V8JsScriptException` is thrown, which has the original PHP exception accessible
416416
via `getPrevious` method.
417-
418-
V8Js versions 0.2.4 and before did not stop JS code execution on PHP exceptions,
419-
but silently ignored them (even so succeeding PHP calls from within the same piece
420-
of JS code were not executed by the PHP engine). This behaviour is considered as
421-
a bug and hence was fixed with 0.2.5 release. Nevertheless there is a
422-
compatibility php.ini switch (`v8js.compat_php_exceptions`) which turns previous
423-
behaviour back on.

php_v8js_macros.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ ZEND_BEGIN_MODULE_GLOBALS(v8js)
113113
/* Ini globals */
114114
bool use_date; /* Generate JS Date objects instead of PHP DateTime */
115115
bool use_array_access; /* Convert ArrayAccess, Countable objects to array-like objects */
116-
bool compat_php_exceptions; /* Don't stop JS execution on PHP exception */
117116

118117
// Timer thread globals
119118
std::deque<v8js_timer_ctx *> timer_stack;

tests/issue_156_001.phpt

Lines changed: 0 additions & 33 deletions
This file was deleted.

v8js_main.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,11 @@ static ZEND_INI_MH(v8js_OnUpdateUseArrayAccess) /* {{{ */
112112
}
113113
/* }}} */
114114

115-
static ZEND_INI_MH(v8js_OnUpdateCompatExceptions) /* {{{ */
116-
{
117-
V8JSG(compat_php_exceptions) = v8js_ini_to_bool(new_value);
118-
return SUCCESS;
119-
}
120-
/* }}} */
121-
122115
ZEND_INI_BEGIN() /* {{{ */
123116
ZEND_INI_ENTRY("v8js.flags", NULL, ZEND_INI_ALL, v8js_OnUpdateV8Flags)
124117
ZEND_INI_ENTRY("v8js.icudtl_dat_path", NULL, ZEND_INI_ALL, v8js_OnUpdateIcudatPath)
125118
ZEND_INI_ENTRY("v8js.use_date", "0", ZEND_INI_ALL, v8js_OnUpdateUseDate)
126119
ZEND_INI_ENTRY("v8js.use_array_access", "0", ZEND_INI_ALL, v8js_OnUpdateUseArrayAccess)
127-
ZEND_INI_ENTRY("v8js.compat_php_exceptions", "0", ZEND_INI_ALL, v8js_OnUpdateCompatExceptions)
128120
ZEND_INI_END()
129121
/* }}} */
130122

v8js_object_export.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static void v8js_call_php_func(zend_object *object, zend_function *method_ptr, v
162162
efree(fci.params);
163163
}
164164

165-
if(EG(exception) && !V8JSG(compat_php_exceptions)) {
165+
if(EG(exception)) {
166166
if(ctx->flags & V8JS_FLAG_PROPAGATE_PHP_EXCEPTIONS) {
167167
zval tmp_zv;
168168
ZVAL_OBJ(&tmp_zv, EG(exception));

0 commit comments

Comments
 (0)