Skip to content

Commit 56e83a9

Browse files
committed
mark clearPendingException & getPendingException functions deprecated
1 parent b9bde37 commit 56e83a9

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

tests/exception_clearing.phpt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@ var_dump($v8->getPendingException());
2121
?>
2222
===EOF===
2323
--EXPECTF--
24+
Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 5
2425
NULL
26+
27+
Deprecated: Function V8Js::clearPendingException() is deprecated in %s%eexception_clearing.php on line 7
28+
29+
Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 8
2530
NULL
31+
32+
Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 11
2633
object(V8JsScriptException)#%d (13) {
2734
["message":protected]=>
2835
string(49) "throw_0:1: ReferenceError: fooobar is not defined"
@@ -73,5 +80,9 @@ object(V8JsScriptException)#%d (13) {
7380
string(57) "ReferenceError: fooobar is not defined
7481
at throw_0:1:1"
7582
}
83+
84+
Deprecated: Function V8Js::clearPendingException() is deprecated in %s%eexception_clearing.php on line 13
85+
86+
Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 14
7687
NULL
7788
===EOF===

tests/exception_propagation_2.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ try {
3838
?>
3939
===EOF===
4040
--EXPECTF--
41+
Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_propagation_2.php on line 11
4142
object(V8JsScriptException)#%d (13) {
4243
["message":protected]=>
4344
string(49) "throw_0:1: ReferenceError: fooobar is not defined"

v8js_class.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,8 +1260,8 @@ const zend_function_entry v8js_methods[] = { /* {{{ */
12601260
PHP_ME(V8Js, compileString, arginfo_v8js_compilestring, ZEND_ACC_PUBLIC)
12611261
PHP_ME(V8Js, executeScript, arginfo_v8js_executescript, ZEND_ACC_PUBLIC)
12621262
PHP_ME(V8Js, checkString, arginfo_v8js_checkstring, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
1263-
PHP_ME(V8Js, getPendingException, arginfo_v8js_getpendingexception, ZEND_ACC_PUBLIC)
1264-
PHP_ME(V8Js, clearPendingException, arginfo_v8js_clearpendingexception, ZEND_ACC_PUBLIC)
1263+
PHP_ME(V8Js, getPendingException, arginfo_v8js_getpendingexception, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
1264+
PHP_ME(V8Js, clearPendingException, arginfo_v8js_clearpendingexception, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
12651265
PHP_ME(V8Js, setModuleNormaliser, arginfo_v8js_setmodulenormaliser, ZEND_ACC_PUBLIC)
12661266
PHP_ME(V8Js, setModuleLoader, arginfo_v8js_setmoduleloader, ZEND_ACC_PUBLIC)
12671267
PHP_ME(V8Js, setTimeLimit, arginfo_v8js_settimelimit, ZEND_ACC_PUBLIC)

0 commit comments

Comments
 (0)