0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-09-19 00:25:18 +00:00

Handle API removal of CreateDefaultPlatform

This commit is contained in:
Timothy Pace 2019-02-11 12:16:35 -08:00
parent 85097c1d68
commit 68d2274297
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) {