mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-09 16:28:41 +00:00
Merge pull request #395 from timothympace/api_updates
Handle API removal of CreateDefaultPlatform
This commit is contained in:
commit
92a5b064ba
@ -94,7 +94,7 @@ if test "$PHP_V8JS" != "no"; then
|
|||||||
LIBS="$LIBS $1 -lv8_libplatform -lv8"
|
LIBS="$LIBS $1 -lv8_libplatform -lv8"
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <libplatform/libplatform.h>
|
#include <libplatform/libplatform.h>
|
||||||
], [ v8::platform::CreateDefaultPlatform(); ])], [
|
], [ v8::platform::NewDefaultPlatform(); ])], [
|
||||||
dnl libv8_libplatform.so found
|
dnl libv8_libplatform.so found
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"
|
V8JS_SHARED_LIBADD="$1 -lv8_libplatform $V8JS_SHARED_LIBADD"
|
||||||
|
@ -50,6 +50,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <v8.h>
|
#include <v8.h>
|
||||||
|
#include <v8-platform.h>
|
||||||
|
|
||||||
#include "v8js_class.h"
|
#include "v8js_class.h"
|
||||||
#include "v8js_v8.h"
|
#include "v8js_v8.h"
|
||||||
@ -154,7 +155,7 @@ struct _v8js_process_globals {
|
|||||||
/* Path to icudtl.dat file */
|
/* Path to icudtl.dat file */
|
||||||
char *icudtl_dat_path;
|
char *icudtl_dat_path;
|
||||||
|
|
||||||
v8::Platform *v8_platform;
|
std::unique_ptr<v8::Platform> v8_platform;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct _v8js_process_globals v8js_process_globals;
|
extern struct _v8js_process_globals v8js_process_globals;
|
||||||
|
@ -60,8 +60,8 @@ void v8js_v8_init() /* {{{ */
|
|||||||
);
|
);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
v8js_process_globals.v8_platform = v8::platform::CreateDefaultPlatform();
|
v8js_process_globals.v8_platform = v8::platform::NewDefaultPlatform();
|
||||||
v8::V8::InitializePlatform(v8js_process_globals.v8_platform);
|
v8::V8::InitializePlatform(v8js_process_globals.v8_platform.get());
|
||||||
|
|
||||||
/* Set V8 command line flags (must be done before V8::Initialize()!) */
|
/* Set V8 command line flags (must be done before V8::Initialize()!) */
|
||||||
if (v8js_process_globals.v8_flags) {
|
if (v8js_process_globals.v8_flags) {
|
||||||
|
Loading…
Reference in New Issue
Block a user