mirror of
https://github.com/phpv8/v8js.git
synced 2024-11-09 15:18:41 +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
|
||||
|
||||
#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::V8::InitializeExternalStartupData(
|
||||
PHP_V8_NATIVES_BLOB_PATH,
|
||||
PHP_V8_SNAPSHOT_BLOB_PATH
|
||||
);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
v8js_process_globals.v8_platform = v8::platform::NewDefaultPlatform();
|
||||
|
Loading…
Reference in New Issue
Block a user