Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion php_v8js_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ extern "C" {
#endif

#include <v8.h>
#include <v8-platform.h>

#include "v8js_class.h"
#include "v8js_v8.h"
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions v8js_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down