Also check if externsParserConfig is null in Compiler.getParserConfig()
This avoids the situation where:
1. parserConfig has been initialized, but externsParserConfig hasn't
2. getParserConfig(EXTERNS) is called on another thread. It checks if parserConfig == null, finds that to be false and returns a null externsParserConfig
@@ -2627,7 +2627,7 @@ public class Compiler extends AbstractCompiler implements ErrorHandler, SourceFi
@Override
Config getParserConfig(ConfigContext context) {
- if (parserConfig == null) {
+ if (parserConfig == null || externsParserConfig == null) {
synchronized (this) {
if (parserConfig == null) {
Config.LanguageMode configLanguageMode = getParserConfigLanguageMode(
