diff --git a/.travis.yml b/.travis.yml index dd2294a..f139b03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,11 @@ services: - docker env: - - V8VER=7.1 + - V8VER=7.5 PHPVER=7.0 - - V8VER=7.1 + - V8VER=7.5 PHPVER=7.1 - - V8VER=7.1 + - V8VER=7.5 PHPVER=7.2 script: make -f Makefile.travis test diff --git a/Makefile.travis b/Makefile.travis index eb5c42b..74cfd27 100644 --- a/Makefile.travis +++ b/Makefile.travis @@ -1,5 +1,5 @@ # Configure and build scripts for travis CI system -V8VER ?= 7.1 +V8VER ?= 7.5 IMAGENAME ?= v8js-test diff --git a/README.Linux.md b/README.Linux.md index f6f5467..86194cc 100644 --- a/README.Linux.md +++ b/README.Linux.md @@ -55,7 +55,7 @@ git checkout 6.4.388.18 gclient sync # Setup GN -tools/dev/v8gen.py -vv x64.release -- is_component_build=true +tools/dev/v8gen.py -vv x64.release -- is_component_build=true use_custom_libcxx=false # Build ninja -C out.gn/x64.release/ diff --git a/v8js_class.cc b/v8js_class.cc index a415192..3dfea48 100644 --- a/v8js_class.cc +++ b/v8js_class.cc @@ -67,7 +67,6 @@ struct v8js_jsext { int deps_count; zend_string *name; zend_string *source; - v8::Extension *extension; }; /* }}} */ @@ -272,7 +271,6 @@ static void v8js_jsext_free_storage(v8js_jsext *jsext) /* {{{ */ if (jsext->deps) { v8js_free_ext_strarr(jsext->deps, jsext->deps_count); } - delete jsext->extension; // Free the persisted non-interned strings we allocated. if (jsext->name) { @@ -1054,7 +1052,7 @@ static int v8js_register_extension(zend_string *name, zend_string *source, zval zend_hash_copy(jsext->deps_ht, Z_ARRVAL_P(deps_arr), v8js_persistent_zval_ctor); } - jsext->extension = new v8::Extension(ZSTR_VAL(jsext->name), ZSTR_VAL(jsext->source), jsext->deps_count, jsext->deps); + v8::Extension *extension = new v8::Extension(ZSTR_VAL(jsext->name), ZSTR_VAL(jsext->source), jsext->deps_count, jsext->deps); if (!zend_hash_add_ptr(v8js_process_globals.extensions, jsext->name, jsext)) { v8js_jsext_free_storage(jsext); @@ -1068,8 +1066,8 @@ static int v8js_register_extension(zend_string *name, zend_string *source, zval v8js_process_globals.lock.unlock(); #endif - jsext->extension->set_auto_enable(auto_enable ? true : false); - v8::RegisterExtension(jsext->extension); + extension->set_auto_enable(auto_enable ? true : false); + v8::RegisterExtension(std::unique_ptr(extension)); return SUCCESS; }