From 30e2ac6fa8bbffc6cc7e98e6feee3931bee1f6ba Mon Sep 17 00:00:00 2001 From: jalr Date: Fri, 10 May 2019 08:24:08 +0200 Subject: [PATCH 1/4] Call v8::RegisterExtension using unique_ptr --- v8js_class.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v8js_class.cc b/v8js_class.cc index a415192..111a90b 100644 --- a/v8js_class.cc +++ b/v8js_class.cc @@ -1069,7 +1069,7 @@ static int v8js_register_extension(zend_string *name, zend_string *source, zval #endif jsext->extension->set_auto_enable(auto_enable ? true : false); - v8::RegisterExtension(jsext->extension); + v8::RegisterExtension(std::unique_ptr(jsext->extension)); return SUCCESS; } From c8be0532f4ae16c2c341c19e14061ab876731c37 Mon Sep 17 00:00:00 2001 From: jalr Date: Fri, 10 May 2019 16:32:06 +0200 Subject: [PATCH 2/4] Add use_custom_libcxx flag --- README.Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/ From 93a46f668f30e6bea21fcf8590b0acfcb07c68fd Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sat, 22 Jun 2019 01:12:27 +0200 Subject: [PATCH 3/4] don't manage/free v8::Extension* (v8 does that now) --- v8js_class.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/v8js_class.cc b/v8js_class.cc index 111a90b..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(std::unique_ptr(jsext->extension)); + extension->set_auto_enable(auto_enable ? true : false); + v8::RegisterExtension(std::unique_ptr(extension)); return SUCCESS; } From bac8a966abd3f585802690498748e25a9c166d04 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Sat, 22 Jun 2019 01:21:47 +0200 Subject: [PATCH 4/4] (travis) use v8 7.5 --- .travis.yml | 6 +++--- Makefile.travis | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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