Skip to content

Commit b292715

Browse files
committed
Fix non-ZTS build.
1 parent 34ca850 commit b292715

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

v8js.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,15 @@ static PHP_MSHUTDOWN_FUNCTION(v8js)
140140
{
141141
UNREGISTER_INI_ENTRIES();
142142

143-
if(v8js_process_globals.v8_initialized) {
143+
bool v8_initialized;
144+
145+
#ifdef ZTS
146+
v8_initialized = v8js_process_globals.v8_initialized;
147+
#else
148+
v8_initialized = V8JSG(v8_initialized);
149+
#endif
150+
151+
if(v8_initialized) {
144152
v8::V8::Dispose();
145153
#if !defined(_WIN32) && PHP_V8_API_VERSION >= 3029036
146154
v8::V8::ShutdownPlatform();

0 commit comments

Comments
 (0)