Bug 845545: Part 7 - Only set up XRay jsids on the main thread. r=bz

This commit is contained in:
Kyle Huey 2013-08-03 16:55:41 -07:00
parent 3e51fcc88e
commit 7c45880c47

View File

@ -1705,7 +1705,9 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
if len(idsToInit) > 1:
initIds = CGWrapper(initIds, pre="(", post=")", reindent=True)
initIds = CGList(
[CGGeneric("%s_ids[0] == JSID_VOID &&" % idsToInit[0]), initIds],
[CGGeneric("%s_ids[0] == JSID_VOID &&" % idsToInit[0]),
CGGeneric("NS_IsMainThread() &&"),
initIds],
"\n")
initIds = CGWrapper(initIds, pre="if (", post=") {", reindent=True)
initIds = CGList(