0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 15:11:53 +00:00

- Be more verbose when trying to register extension after V8 is already initialized

This commit is contained in:
Jani Taskinen 2010-12-30 15:37:35 +00:00
parent c53dc7745f
commit 2568591d66

View File

@ -847,6 +847,11 @@ static PHP_METHOD(V8Js, registerExtension)
int ext_name_len, script_len;
zend_bool auto_enable = 0;
if (V8JSG(v8_initialized)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "V8 engine already initialized. Cannot register extension");
RETURN_FALSE;
}
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ab", &ext_name, &ext_name_len, &script, &script_len, &deps_arr, &auto_enable) == FAILURE) {
return;
}