@@ -318,7 +318,7 @@ static void php_v8js_construct_callback(const v8::FunctionCallbackInfo<v8::Value
318318 if (ctor_ptr != NULL ) {
319319 php_v8js_call_php_func (value, ce, ctor_ptr, isolate, info TSRMLS_CC);
320320 }
321- php_object = V8JS_NEW ( v8::External, isolate, value);
321+ php_object = v8::External::New ( isolate, value);
322322 }
323323
324324 newobj->SetAlignedPointerInInternalField (0 , ext_tmpl->Value ());
@@ -405,15 +405,15 @@ static void php_v8js_weak_closure_callback(const v8::WeakCallbackData<v8::Object
405405 !strncasecmp(key, mname, key_len - 1 ))
406406
407407#define PHP_V8JS_CALLBACK (isolate, mptr, tmpl ) \
408- V8JS_NEW ( v8::FunctionTemplate, ( isolate), php_v8js_php_callback, V8JS_NEW( v8::External, ( isolate), mptr), V8JS_NEW( v8::Signature, (isolate), tmpl))->GetFunction()
408+ v8::FunctionTemplate::New (( isolate), php_v8js_php_callback, v8::External::New(( isolate), mptr), v8::Signature::New( (isolate), tmpl))->GetFunction()
409409
410410
411411static void php_v8js_named_property_enumerator(const v8::PropertyCallbackInfo<v8::Array> &info) /* {{{ */
412412{
413413 // note: 'special' properties like 'constructor' are not enumerated.
414414 v8::Isolate *isolate = info.GetIsolate ();
415415 v8::Local<v8::Object> self = info.Holder ();
416- v8::Local<v8::Array> result = V8JS_NEW ( v8::Array, isolate, 0 );
416+ v8::Local<v8::Array> result = v8::Array::New ( isolate, 0 );
417417 uint32_t result_len = 0 ;
418418
419419 V8JS_TSRMLS_FETCH ();
@@ -690,9 +690,9 @@ static inline v8::Local<v8::Value> php_v8js_named_property_callback(v8::Local<v8
690690 // (only use this if method_ptr==NULL, which means
691691 // there is no actual PHP __call() implementation)
692692 v8::Local<v8::Function> cb =
693- V8JS_NEW ( v8::FunctionTemplate, isolate,
693+ v8::FunctionTemplate::New ( isolate,
694694 php_v8js_fake_call_impl, V8JS_NULL,
695- V8JS_NEW ( v8::Signature, isolate, tmpl))->GetFunction ();
695+ v8::Signature::New ( isolate, tmpl))->GetFunction ();
696696 cb->SetName (property);
697697 ret_value = cb;
698698 } else {
@@ -931,7 +931,7 @@ static v8::Handle<v8::Value> php_v8js_hash_to_jsobj(zval *value, v8::Isolate *is
931931 }
932932 catch (const std::out_of_range &) {
933933 /* No cached v8::FunctionTemplate available as of yet, create one. */
934- new_tpl = V8JS_NEW ( v8::FunctionTemplate, isolate, 0 );
934+ new_tpl = v8::FunctionTemplate::New ( isolate, 0 );
935935
936936 new_tpl->SetClassName (V8JS_STRL (ce->name , ce->name_length ));
937937 new_tpl->InstanceTemplate ()->SetInternalFieldCount (1 );
@@ -964,14 +964,14 @@ static v8::Handle<v8::Value> php_v8js_hash_to_jsobj(zval *value, v8::Isolate *is
964964 new_tpl->InstanceTemplate ()->SetCallAsFunctionHandler (php_v8js_invoke_callback, PHP_V8JS_CALLBACK (isolate, invoke_method_ptr, new_tpl));
965965 }
966966 }
967- v8::Local<v8::Array> call_handler_data = V8JS_NEW ( v8::Array, isolate, 2 );
968- call_handler_data->Set (0 , V8JS_NEW ( v8::External, isolate, persist_tpl_));
969- call_handler_data->Set (1 , V8JS_NEW ( v8::External, isolate, ce));
967+ v8::Local<v8::Array> call_handler_data = v8::Array::New ( isolate, 2 );
968+ call_handler_data->Set (0 , v8::External::New ( isolate, persist_tpl_));
969+ call_handler_data->Set (1 , v8::External::New ( isolate, ce));
970970 new_tpl->SetCallHandler (php_v8js_construct_callback, call_handler_data);
971971 }
972972
973973 // Create v8 wrapper object
974- v8::Handle<v8::Value> external = V8JS_NEW ( v8::External, isolate, value);
974+ v8::Handle<v8::Value> external = v8::External::New ( isolate, value);
975975 newobj = new_tpl->GetFunction ()->NewInstance (1 , &external);
976976
977977 if (ce == zend_ce_closure) {
@@ -981,7 +981,7 @@ static v8::Handle<v8::Value> php_v8js_hash_to_jsobj(zval *value, v8::Isolate *is
981981 }
982982 } else {
983983 // @todo re-use template likewise
984- v8::Local<v8::FunctionTemplate> new_tpl = V8JS_NEW ( v8::FunctionTemplate, isolate, 0 );
984+ v8::Local<v8::FunctionTemplate> new_tpl = v8::FunctionTemplate::New ( isolate, 0 );
985985
986986 new_tpl->SetClassName (V8JS_SYM (" Array" ));
987987 newobj = new_tpl->InstanceTemplate ()->NewInstance ();
@@ -1050,7 +1050,7 @@ static v8::Handle<v8::Value> php_v8js_hash_to_jsarr(zval *value, v8::Isolate *is
10501050 return V8JS_NULL;
10511051 }
10521052
1053- newarr = V8JS_NEW ( v8::Array, isolate, i);
1053+ newarr = v8::Array::New ( isolate, i);
10541054
10551055 if (i > 0 )
10561056 {
0 commit comments