0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-09 16:28:41 +00:00

remove left-over TSRM stuff

This commit is contained in:
Stefan Siegl 2017-03-11 13:45:23 +01:00
parent 3e8ef5f684
commit 745126b5cb
6 changed files with 11 additions and 11 deletions

View File

@ -344,7 +344,7 @@ static PHP_METHOD(V8Js, __construct)
}
/* Initialize V8 */
v8js_v8_init(TSRMLS_C);
v8js_v8_init();
/* Throw PHP exception if uncaught exceptions exist */
c->report_uncaught = report_uncaught;
@ -1130,7 +1130,7 @@ static PHP_METHOD(V8Js, createSnapshot)
}
/* Initialize V8, if not already done. */
v8js_v8_init(TSRMLS_C);
v8js_v8_init();
v8::StartupData snapshot_blob = v8::V8::CreateSnapshotDataBlob(ZSTR_VAL(script));
@ -1320,10 +1320,10 @@ PHP_MINIT_FUNCTION(v8js_class) /* {{{ */
v8js_object_handlers.unset_property = v8js_unset_property;
/* V8Js Class Constants */
zend_declare_class_constant_string(php_ce_v8js, ZEND_STRL("V8_VERSION"), PHP_V8_VERSION TSRMLS_CC);
zend_declare_class_constant_string(php_ce_v8js, ZEND_STRL("V8_VERSION"), PHP_V8_VERSION);
zend_declare_class_constant_long(php_ce_v8js, ZEND_STRL("FLAG_NONE"), V8JS_FLAG_NONE TSRMLS_CC);
zend_declare_class_constant_long(php_ce_v8js, ZEND_STRL("FLAG_FORCE_ARRAY"), V8JS_FLAG_FORCE_ARRAY TSRMLS_CC);
zend_declare_class_constant_long(php_ce_v8js, ZEND_STRL("FLAG_NONE"), V8JS_FLAG_NONE);
zend_declare_class_constant_long(php_ce_v8js, ZEND_STRL("FLAG_FORCE_ARRAY"), V8JS_FLAG_FORCE_ARRAY);
zend_declare_class_constant_long(php_ce_v8js, ZEND_STRL("FLAG_PROPAGATE_PHP_EXCEPTIONS"), V8JS_FLAG_PROPAGATE_PHP_EXCEPTIONS);
le_v8js_script = zend_register_list_destructors_ex(v8js_script_dtor, NULL, PHP_V8JS_SCRIPT_RES_NAME, module_number);

View File

@ -84,7 +84,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
if(try_catch->Exception()->IsObject() && try_catch->Exception()->ToObject()->InternalFieldCount() == 2) {
zend_object *php_exception = reinterpret_cast<zend_object *>(try_catch->Exception()->ToObject()->GetAlignedPointerFromInternalField(1));
zend_class_entry *exception_ce = zend_exception_get_default(TSRMLS_C);
zend_class_entry *exception_ce = zend_exception_get_default();
if (instanceof_function(php_exception->ce, exception_ce)) {
++GC_REFCOUNT(php_exception);
zend_exception_set_previous(Z_OBJ_P(return_value), php_exception);

View File

@ -268,7 +268,7 @@ V8JS_METHOD(require)
// Check if an exception was thrown
if (EG(exception)) {
// Clear the PHP exception and throw it in V8 instead
zend_clear_exception(TSRMLS_C);
zend_clear_exception();
info.GetReturnValue().Set(isolate->ThrowException(V8JS_SYM("Module normaliser callback exception")));
return;
}
@ -390,7 +390,7 @@ V8JS_METHOD(require)
efree(normalised_path);
// Clear the PHP exception and throw it in V8 instead
zend_clear_exception(TSRMLS_C);
zend_clear_exception();
info.GetReturnValue().Set(isolate->ThrowException(V8JS_SYM("Module loader callback exception")));
return;
}

View File

@ -167,7 +167,7 @@ failure:
zval tmp_zv;
ZVAL_OBJ(&tmp_zv, EG(exception));
return_value = isolate->ThrowException(zval_to_v8js(&tmp_zv, isolate));
zend_clear_exception(TSRMLS_C);
zend_clear_exception();
} else {
v8js_terminate_execution(isolate);
}

View File

@ -32,7 +32,7 @@ extern "C" {
#include <libplatform/libplatform.h>
void v8js_v8_init(TSRMLS_D) /* {{{ */
void v8js_v8_init() /* {{{ */
{
/* Run only once; thread-local test first */
if (V8JSG(v8_initialized)) {

View File

@ -51,7 +51,7 @@ static inline const char * ToCString(const v8::String::Utf8Value &value) /* {{{
void v8js_v8_init(TSRMLS_D);
void v8js_v8_init();
void v8js_v8_call(v8js_ctx *c, zval **return_value,
long flags, long time_limit, long memory_limit,
std::function< v8::Local<v8::Value>(v8::Isolate *) >& v8_call);