瀏覽代碼

Fix non-ZTS build.

Stefan Siegl 9 年之前
父節點
當前提交
b292715c75
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      v8js.cc

+ 9 - 1
v8js.cc

@@ -140,7 +140,15 @@ static PHP_MSHUTDOWN_FUNCTION(v8js)
 {
 	UNREGISTER_INI_ENTRIES();
 
-	if(v8js_process_globals.v8_initialized) {
+	bool v8_initialized;
+
+#ifdef ZTS
+	v8_initialized = v8js_process_globals.v8_initialized;
+#else
+	v8_initialized = V8JSG(v8_initialized);
+#endif
+
+	if(v8_initialized) {
 		v8::V8::Dispose();
 #if !defined(_WIN32) && PHP_V8_API_VERSION >= 3029036
 		v8::V8::ShutdownPlatform();