0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 12:51:52 +00:00

Merge pull request #395 from timothympace/api_updates

Handle API removal of CreateDefaultPlatform
This commit is contained in:
Stefan Siegl 2019-02-12 07:47:59 +01:00 committed by GitHub
commit 92a5b064ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -94,7 +94,7 @@ if test "$PHP_V8JS" != "no"; then
LIBS="$LIBS $1 -lv8_libplatform -lv8"
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <libplatform/libplatform.h>
], [ v8::platform::CreateDefaultPlatform(); ])], [
], [ v8::platform::NewDefaultPlatform(); ])], [
dnl libv8_libplatform.so found
AC_MSG_RESULT(found)
V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"

View File

@ -50,6 +50,7 @@ extern "C" {
#endif
#include <v8.h>
#include <v8-platform.h>
#include "v8js_class.h"
#include "v8js_v8.h"
@ -154,7 +155,7 @@ struct _v8js_process_globals {
/* Path to icudtl.dat file */
char *icudtl_dat_path;
v8::Platform *v8_platform;
std::unique_ptr<v8::Platform> v8_platform;
};
extern struct _v8js_process_globals v8js_process_globals;

View File

@ -60,8 +60,8 @@ void v8js_v8_init() /* {{{ */
);
#endif
v8js_process_globals.v8_platform = v8::platform::CreateDefaultPlatform();
v8::V8::InitializePlatform(v8js_process_globals.v8_platform);
v8js_process_globals.v8_platform = v8::platform::NewDefaultPlatform();
v8::V8::InitializePlatform(v8js_process_globals.v8_platform.get());
/* Set V8 command line flags (must be done before V8::Initialize()!) */
if (v8js_process_globals.v8_flags) {