Re-initialize shader translator properly after one shutdown.

Because of a local static, we could get stuck and never re-initialize
the translator after calling ShFinalize.

BUG=344043

Change-Id: Ib4d18da886eac28f3e1bc959a7eadf5b34d9410f
Reviewed-on: https://chromium-review.googlesource.com/186975
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/187848
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index 494c8b0..9e2663d 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -17,6 +17,8 @@
 #include "compiler/translator/TranslatorHLSL.h"
 #include "compiler/translator/VariablePacker.h"
 
+static bool isInitialized = false;
+
 //
 // This is the platform independent interface between an OGL driver
 // and the shading language compiler.
@@ -49,8 +51,8 @@
 //
 int ShInitialize()
 {
-    static const bool kInitialized = InitProcess();
-    return kInitialized ? 1 : 0;
+    isInitialized = InitProcess();
+    return isInitialized ? 1 : 0;
 }
 
 //
@@ -59,6 +61,7 @@
 int ShFinalize()
 {
     DetachProcess();
+    isInitialized = false;
     return 1;
 }