mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 08:11:52 +00:00
remove V8JS_TSRMLS_FETCH
This commit is contained in:
parent
24bb1761bf
commit
3e8ef5f684
@ -65,8 +65,6 @@ void v8js_array_access_getter(uint32_t index, const v8::PropertyCallbackInfo<v8:
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
v8::Local<v8::Object> self = info.Holder();
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
|
||||
zval zvalue;
|
||||
@ -86,8 +84,6 @@ void v8js_array_access_setter(uint32_t index, v8::Local<v8::Value> value,
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
v8::Local<v8::Object> self = info.Holder();
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
|
||||
zval zvalue;
|
||||
@ -160,8 +156,6 @@ static void v8js_array_access_length(v8::Local<v8::String> property, const v8::P
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
v8::Local<v8::Object> self = info.Holder();
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
|
||||
int length = v8js_array_access_get_count_result(object);
|
||||
@ -174,8 +168,6 @@ void v8js_array_access_deleter(uint32_t index, const v8::PropertyCallbackInfo<v8
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
v8::Local<v8::Object> self = info.Holder();
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
|
||||
zval zvalue;
|
||||
@ -193,8 +185,6 @@ void v8js_array_access_query(uint32_t index, const v8::PropertyCallbackInfo<v8::
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
v8::Local<v8::Object> self = info.Holder();
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
|
||||
/* If index is set, then return an integer encoding a v8::PropertyAttribute;
|
||||
@ -211,8 +201,6 @@ void v8js_array_access_enumerator(const v8::PropertyCallbackInfo<v8::Array>& inf
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
v8::Local<v8::Object> self = info.Holder();
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
|
||||
int length = v8js_array_access_get_count_result(object);
|
||||
|
@ -213,7 +213,6 @@ static zend_object* v8js_new(zend_class_entry *ce) /* {{{ */
|
||||
object_properties_init(&c->std, ce);
|
||||
|
||||
c->std.handlers = &v8js_object_handlers;
|
||||
TSRMLS_SET_CTX(c->zts_ctx);
|
||||
|
||||
new(&c->object_name) v8::Persistent<v8::String>();
|
||||
new(&c->context) v8::Persistent<v8::Context>();
|
||||
|
10
v8js_class.h
10
v8js_class.h
@ -74,20 +74,10 @@ struct v8js_ctx {
|
||||
zval zval_snapshot_blob;
|
||||
v8::StartupData snapshot_blob;
|
||||
|
||||
#ifdef ZTS
|
||||
void ***zts_ctx;
|
||||
#endif
|
||||
|
||||
zend_object std;
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
#ifdef ZTS
|
||||
# define V8JS_TSRMLS_FETCH() TSRMLS_FETCH_FROM_CTX(((v8js_ctx *) isolate->GetData(0))->zts_ctx);
|
||||
#else
|
||||
# define V8JS_TSRMLS_FETCH()
|
||||
#endif
|
||||
|
||||
static inline struct v8js_ctx *v8js_ctx_fetch_object(zend_object *obj) {
|
||||
return (struct v8js_ctx *)((char *)obj - XtOffsetOf(struct v8js_ctx, std));
|
||||
}
|
||||
|
@ -193,7 +193,6 @@ static void v8js_dumper(v8::Isolate *isolate, v8::Local<v8::Value> var, int leve
|
||||
V8JS_METHOD(var_dump) /* {{{ */
|
||||
{
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
for (int i = 0; i < info.Length(); i++) {
|
||||
v8js_dumper(isolate, info[i], 1);
|
||||
@ -206,7 +205,6 @@ V8JS_METHOD(var_dump) /* {{{ */
|
||||
V8JS_METHOD(require)
|
||||
{
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
// Get the extension context
|
||||
v8::Local<v8::External> data = v8::Local<v8::External>::Cast(info.Data());
|
||||
|
@ -191,7 +191,6 @@ void v8js_php_callback(const v8::FunctionCallbackInfo<v8::Value>& info) /* {{{ *
|
||||
v8::Isolate *isolate = info.GetIsolate();
|
||||
v8::Local<v8::Object> self = info.Holder();
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
zend_function *method_ptr;
|
||||
|
||||
@ -243,7 +242,6 @@ static void v8js_construct_callback(const v8::FunctionCallbackInfo<v8::Value>& i
|
||||
Z_ADDREF_P(&value);
|
||||
} else {
|
||||
// Object created from JavaScript context. Need to create PHP object first.
|
||||
V8JS_TSRMLS_FETCH();
|
||||
zend_class_entry *ce = static_cast<zend_class_entry *>(ext_ce->Value());
|
||||
zend_function *ctor_ptr = ce->constructor;
|
||||
|
||||
@ -322,7 +320,6 @@ static void v8js_named_property_enumerator(const v8::PropertyCallbackInfo<v8::Ar
|
||||
v8::Local<v8::Array> result = v8::Array::New(isolate, 0);
|
||||
uint32_t result_len = 0;
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
zend_class_entry *ce;
|
||||
void *ptr;
|
||||
HashTable *proptable;
|
||||
@ -425,8 +422,6 @@ static void v8js_invoke_callback(const v8::FunctionCallbackInfo<v8::Value>& info
|
||||
v8::Local<v8::Value> *argv = static_cast<v8::Local<v8::Value> *>(alloca(sizeof(v8::Local<v8::Value>) * argc));
|
||||
v8::Local<v8::Value> result;
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
for (i=0; i<argc; i++) {
|
||||
new(&argv[i]) v8::Local<v8::Value>;
|
||||
argv[i] = info[i];
|
||||
@ -465,7 +460,6 @@ static void v8js_fake_call_impl(const v8::FunctionCallbackInfo<v8::Value>& info)
|
||||
char *error;
|
||||
size_t error_len;
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
zend_class_entry *ce;
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
ce = object->ce;
|
||||
@ -590,7 +584,6 @@ v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> property
|
||||
v8::Local<v8::Value> ret_value;
|
||||
v8::Local<v8::Function> cb;
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
zend_class_entry *scope, *ce;
|
||||
zend_function *method_ptr = NULL;
|
||||
zval php_value;
|
||||
|
@ -32,8 +32,6 @@ static void v8js_fetch_php_variable(v8::Local<v8::String> name, const v8::Proper
|
||||
v8::Isolate *isolate = ctx->isolate;
|
||||
zval *variable;
|
||||
|
||||
V8JS_TSRMLS_FETCH();
|
||||
|
||||
zend_is_auto_global(ctx->variable_name);
|
||||
|
||||
if ((variable = zend_hash_find(&EG(symbol_table), ctx->variable_name))) {
|
||||
|
Loading…
Reference in New Issue
Block a user