Bug 1229031. Make sure to not init binding pref var caches on worker threads. r=smaug

This commit is contained in:
Boris Zbarsky 2015-11-30 22:04:20 -05:00
parent d66acee504
commit 8ed93afa4c

View File

@ -2779,7 +2779,7 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
for pref, ptr in prefCacheData]
prefCache = CGWrapper(CGIndenter(CGList(prefCacheData)),
pre=("static bool sPrefCachesInited = false;\n"
"if (!sPrefCachesInited) {\n"
"if (!sPrefCachesInited && NS_IsMainThread()) {\n"
" sPrefCachesInited = true;\n"),
post="}\n")
else: