From 8ed93afa4cb6772aa5fa2260db2eecf0accc773c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 30 Nov 2015 22:04:20 -0500 Subject: [PATCH] Bug 1229031. Make sure to not init binding pref var caches on worker threads. r=smaug --- dom/bindings/Codegen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 8f2eefec91b4..5bdc84af81f4 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -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: