mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 14:01:53 +00:00
Merge remote-tracking branch 'origin/master' into php7
This commit is contained in:
commit
c459acd1ef
@ -31,6 +31,9 @@ Compile latest V8
|
||||
|
||||
|
||||
```
|
||||
# Install `build-essential` if you haven't already:
|
||||
sudo apt-get install build-essential
|
||||
|
||||
# Install `libicu-dev` if you haven't already:
|
||||
sudo apt-get install libicu-dev
|
||||
|
||||
|
15
package.xml
15
package.xml
@ -700,5 +700,20 @@ Code Cleanup
|
||||
- Removed old examples and pre-phpt test script
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<version>
|
||||
<release>0.6.4</release>
|
||||
<api>0.6.4</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<date>2016-07-02</date>
|
||||
<license uri="http://www.php.net/license">The MIT License (MIT)</license>
|
||||
<notes>
|
||||
Fix build against V8 5.3.337 (and higher)
|
||||
</notes>
|
||||
</release>
|
||||
</changelog>
|
||||
</package>
|
||||
|
@ -25,6 +25,7 @@ extern zend_module_entry v8js_module_entry;
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -172,6 +172,7 @@ void v8js_register_methods(v8::Handle<v8::ObjectTemplate>, v8js_ctx *c);
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
1
v8js.cc
1
v8js.cc
@ -279,6 +279,7 @@ zend_module_entry v8js_module_entry = {
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -255,6 +255,7 @@ void v8js_array_access_named_getter(v8::Local<v8::String> property, const v8::Pr
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -29,3 +29,13 @@ void v8js_array_access_named_getter(v8::Local<v8::String> property,
|
||||
const v8::PropertyCallbackInfo<v8::Value> &info);
|
||||
|
||||
#endif /* V8JS_ARRAY_ACCESS_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -1266,6 +1266,7 @@ PHP_MINIT_FUNCTION(v8js_class) /* {{{ */
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -103,6 +103,7 @@ PHP_MINIT_FUNCTION(v8js_class);
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -108,3 +108,13 @@ void v8js_commonjs_normalise_identifier(const char *base, const char *identifier
|
||||
efree(term);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -16,3 +16,13 @@
|
||||
void v8js_commonjs_normalise_identifier(const char *base, const char *identifier, char *normalised_path, char *module_name);
|
||||
|
||||
#endif /* V8JS_COMMONJS_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -227,7 +227,7 @@ int v8js_to_zval(v8::Handle<v8::Value> jsValue, zval *return_value, int flags, v
|
||||
v8::Local<v8::Object> self = jsValue->ToObject();
|
||||
|
||||
// if this is a wrapped PHP object, then just unwrap it.
|
||||
if (self->InternalFieldCount()) {
|
||||
if (self->InternalFieldCount() == 2) {
|
||||
zend_object *object = reinterpret_cast<zend_object *>(self->GetAlignedPointerFromInternalField(1));
|
||||
zval zval_object;
|
||||
ZVAL_OBJ(&zval_object, object);
|
||||
@ -256,6 +256,7 @@ int v8js_to_zval(v8::Handle<v8::Value> jsValue, zval *return_value, int flags, v
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -81,7 +81,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
|
||||
PHPV8_EXPROP(_string, JsTrace, stacktrace_string);
|
||||
}
|
||||
|
||||
if(try_catch->Exception()->IsObject() && try_catch->Exception()->ToObject()->InternalFieldCount()) {
|
||||
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);
|
||||
@ -245,6 +245,7 @@ PHP_MINIT_FUNCTION(v8js_exceptions) /* {{{ */
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -31,6 +31,7 @@ PHP_MINIT_FUNCTION(v8js_exceptions);
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -512,6 +512,7 @@ void v8js_register_methods(v8::Handle<v8::ObjectTemplate> global, v8js_ctx *c) /
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -89,7 +89,7 @@ static void v8js_call_php_func(zend_object *object, zend_function *method_ptr, v
|
||||
if (argc) {
|
||||
fci.params = (zval *) safe_emalloc(argc, sizeof(zval), 0);
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (info[i]->IsObject() && info[i]->ToObject()->InternalFieldCount()) {
|
||||
if (info[i]->IsObject() && info[i]->ToObject()->InternalFieldCount() == 2) {
|
||||
/* This is a PHP object, passed to JS and back. */
|
||||
zend_object *object = reinterpret_cast<zend_object *>(info[i]->ToObject()->GetAlignedPointerFromInternalField(1));
|
||||
ZVAL_OBJ(&fci.params[i], object);
|
||||
@ -964,6 +964,7 @@ v8::Handle<v8::Value> v8js_hash_to_jsobj(zval *value, v8::Isolate *isolate TSRML
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -33,3 +33,13 @@ v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::String> property
|
||||
void v8js_php_callback(const v8::FunctionCallbackInfo<v8::Value>& info);
|
||||
|
||||
#endif /* V8JS_OBJECT_EXPORT_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -151,6 +151,7 @@ void v8js_timer_push(long time_limit, long memory_limit, v8js_ctx *c TSRMLS_DC)
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -33,6 +33,7 @@ void v8js_timer_push(long time_limit, long memory_limit, v8js_ctx *c TSRMLS_DC);
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -274,7 +274,7 @@ int v8js_get_properties_hash(v8::Handle<v8::Value> jsValue, HashTable *retval, i
|
||||
zval value;
|
||||
ZVAL_UNDEF(&value);
|
||||
|
||||
if (jsVal->IsObject() && jsVal->ToObject()->InternalFieldCount()) {
|
||||
if (jsVal->IsObject() && jsVal->ToObject()->InternalFieldCount() == 2) {
|
||||
/* This is a PHP object, passed to JS and back. */
|
||||
zend_object *object = reinterpret_cast<zend_object *>(jsVal->ToObject()->GetAlignedPointerFromInternalField(1));
|
||||
ZVAL_OBJ(&value, object);
|
||||
@ -308,6 +308,7 @@ int v8js_get_properties_hash(v8::Handle<v8::Value> jsValue, HashTable *retval, i
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -82,6 +82,7 @@ int v8js_get_properties_hash(v8::Handle<v8::Value> jsValue, HashTable *retval, i
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -784,6 +784,7 @@ PHP_MINIT_FUNCTION(v8js_v8object_class) /* {{{ */
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -65,6 +65,7 @@ PHP_MINIT_FUNCTION(v8js_v8object_class);
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
@ -84,6 +84,7 @@ void v8js_register_accessors(std::vector<v8js_accessor_ctx*> *accessor_list, v8:
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
|
Loading…
Reference in New Issue
Block a user