Ver código fonte

mark clearPendingException & getPendingException functions deprecated

Stefan Siegl 7 anos atrás
pai
commit
56e83a9fbb
3 arquivos alterados com 14 adições e 2 exclusões
  1. 11 0
      tests/exception_clearing.phpt
  2. 1 0
      tests/exception_propagation_2.phpt
  3. 2 2
      v8js_class.cc

+ 11 - 0
tests/exception_clearing.phpt

@@ -21,8 +21,15 @@ var_dump($v8->getPendingException());
 ?>
 ?>
 ===EOF===
 ===EOF===
 --EXPECTF--
 --EXPECTF--
+Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 5
 NULL
 NULL
+
+Deprecated: Function V8Js::clearPendingException() is deprecated in %s%eexception_clearing.php on line 7
+
+Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 8
 NULL
 NULL
+
+Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 11
 object(V8JsScriptException)#%d (13) {
 object(V8JsScriptException)#%d (13) {
   ["message":protected]=>
   ["message":protected]=>
   string(49) "throw_0:1: ReferenceError: fooobar is not defined"
   string(49) "throw_0:1: ReferenceError: fooobar is not defined"
@@ -73,5 +80,9 @@ object(V8JsScriptException)#%d (13) {
   string(57) "ReferenceError: fooobar is not defined
   string(57) "ReferenceError: fooobar is not defined
     at throw_0:1:1"
     at throw_0:1:1"
 }
 }
+
+Deprecated: Function V8Js::clearPendingException() is deprecated in %s%eexception_clearing.php on line 13
+
+Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_clearing.php on line 14
 NULL
 NULL
 ===EOF===
 ===EOF===

+ 1 - 0
tests/exception_propagation_2.phpt

@@ -38,6 +38,7 @@ try {
 ?>
 ?>
 ===EOF===
 ===EOF===
 --EXPECTF--
 --EXPECTF--
+Deprecated: Function V8Js::getPendingException() is deprecated in %s%eexception_propagation_2.php on line 11
 object(V8JsScriptException)#%d (13) {
 object(V8JsScriptException)#%d (13) {
   ["message":protected]=>
   ["message":protected]=>
   string(49) "throw_0:1: ReferenceError: fooobar is not defined"
   string(49) "throw_0:1: ReferenceError: fooobar is not defined"

+ 2 - 2
v8js_class.cc

@@ -1260,8 +1260,8 @@ const zend_function_entry v8js_methods[] = { /* {{{ */
 	PHP_ME(V8Js,	compileString,			arginfo_v8js_compilestring,			ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,	compileString,			arginfo_v8js_compilestring,			ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,    executeScript,			arginfo_v8js_executescript,			ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,    executeScript,			arginfo_v8js_executescript,			ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,    checkString,			arginfo_v8js_checkstring,			ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
 	PHP_ME(V8Js,    checkString,			arginfo_v8js_checkstring,			ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
-	PHP_ME(V8Js,	getPendingException,	arginfo_v8js_getpendingexception,	ZEND_ACC_PUBLIC)
-	PHP_ME(V8Js,	clearPendingException,	arginfo_v8js_clearpendingexception,	ZEND_ACC_PUBLIC)
+	PHP_ME(V8Js,	getPendingException,	arginfo_v8js_getpendingexception,	ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
+	PHP_ME(V8Js,	clearPendingException,	arginfo_v8js_clearpendingexception,	ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
 	PHP_ME(V8Js,	setModuleNormaliser,	arginfo_v8js_setmodulenormaliser,	ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,	setModuleNormaliser,	arginfo_v8js_setmodulenormaliser,	ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,	setModuleLoader,		arginfo_v8js_setmoduleloader,		ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,	setModuleLoader,		arginfo_v8js_setmoduleloader,		ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,	setTimeLimit,			arginfo_v8js_settimelimit,			ZEND_ACC_PUBLIC)
 	PHP_ME(V8Js,	setTimeLimit,			arginfo_v8js_settimelimit,			ZEND_ACC_PUBLIC)