Skip to content

Commit 92a5b06

Browse files
authored
Merge pull request #395 from timothympace/api_updates
Handle API removal of CreateDefaultPlatform
2 parents 85097c1 + 68d2274 commit 92a5b06

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ if test "$PHP_V8JS" != "no"; then
9494
LIBS="$LIBS $1 -lv8_libplatform -lv8"
9595
AC_LINK_IFELSE([AC_LANG_PROGRAM([
9696
#include <libplatform/libplatform.h>
97-
], [ v8::platform::CreateDefaultPlatform(); ])], [
97+
], [ v8::platform::NewDefaultPlatform(); ])], [
9898
dnl libv8_libplatform.so found
9999
AC_MSG_RESULT(found)
100100
V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"

php_v8js_macros.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ extern "C" {
5050
#endif
5151

5252
#include <v8.h>
53+
#include <v8-platform.h>
5354

5455
#include "v8js_class.h"
5556
#include "v8js_v8.h"
@@ -154,7 +155,7 @@ struct _v8js_process_globals {
154155
/* Path to icudtl.dat file */
155156
char *icudtl_dat_path;
156157

157-
v8::Platform *v8_platform;
158+
std::unique_ptr<v8::Platform> v8_platform;
158159
};
159160

160161
extern struct _v8js_process_globals v8js_process_globals;

v8js_v8.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ void v8js_v8_init() /* {{{ */
6060
);
6161
#endif
6262

63-
v8js_process_globals.v8_platform = v8::platform::CreateDefaultPlatform();
64-
v8::V8::InitializePlatform(v8js_process_globals.v8_platform);
63+
v8js_process_globals.v8_platform = v8::platform::NewDefaultPlatform();
64+
v8::V8::InitializePlatform(v8js_process_globals.v8_platform.get());
6565

6666
/* Set V8 command line flags (must be done before V8::Initialize()!) */
6767
if (v8js_process_globals.v8_flags) {

0 commit comments

Comments
 (0)