Bug 845545: Part 7 - Only set up XRay jsids on the main thread. r=bz
authorKyle Huey <khuey@kylehuey.com>
Sat, 03 Aug 2013 16:55:41 -0700
changeset 153600 780fd3893cc92e73522c813520a1c17c63a42e53
parent 153599 f88dd557de90d580cbd05a300e30bf1183a8cfc4
child 153601 ddad646a1d86a103ff401051588eebbaea3fd203
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs845545
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 845545: Part 7 - Only set up XRay jsids on the main thread. r=bz
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -1700,17 +1700,19 @@ class CGCreateInterfaceObjectsMethod(CGA
                     idsToInit.append(props.variableName(False))
         if len(idsToInit) > 0:
             initIds = CGList(
                 [CGGeneric("!InitIds(aCx, %s, %s_ids)" % (varname, varname)) for
                  varname in idsToInit], ' ||\n')
             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(
                 [initIds,
                  CGGeneric(("  %s_ids[0] = JSID_VOID;\n"
                             "  return;") % idsToInit[0]),
                  CGGeneric("}")],
                 "\n")