mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 12:51:52 +00:00
correctly load V8 8.x snapshot blob
This commit is contained in:
parent
801c744885
commit
8fe3cbc292
10
v8js_v8.cc
10
v8js_v8.cc
@ -52,12 +52,20 @@ void v8js_v8_init() /* {{{ */
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PHP_V8_NATIVES_BLOB_PATH) && defined(PHP_V8_SNAPSHOT_BLOB_PATH)
|
|
||||||
|
#if defined(PHP_V8_SNAPSHOT_BLOB_PATH)
|
||||||
|
#if !defined(PHP_V8_NATIVES_BLOB_PATH)
|
||||||
|
/* Newer V8 version don't have a natives blob anymore. */
|
||||||
|
v8::V8::InitializeExternalStartupDataFromFile(
|
||||||
|
PHP_V8_SNAPSHOT_BLOB_PATH
|
||||||
|
);
|
||||||
|
#else
|
||||||
/* V8 doesn't work without startup data, load it. */
|
/* V8 doesn't work without startup data, load it. */
|
||||||
v8::V8::InitializeExternalStartupData(
|
v8::V8::InitializeExternalStartupData(
|
||||||
PHP_V8_NATIVES_BLOB_PATH,
|
PHP_V8_NATIVES_BLOB_PATH,
|
||||||
PHP_V8_SNAPSHOT_BLOB_PATH
|
PHP_V8_SNAPSHOT_BLOB_PATH
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
v8js_process_globals.v8_platform = v8::platform::NewDefaultPlatform();
|
v8js_process_globals.v8_platform = v8::platform::NewDefaultPlatform();
|
||||||
|
Loading…
Reference in New Issue
Block a user