Bug 798187 followup. Actually return our newly-created object from dictionary ToObject. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 22 Oct 2012 14:35:08 -0400
changeset 111199 c2a70bac7627304e53ff183a1615e8c34d70c218
parent 111198 1d2cb3aeb1aca58b583023ea73c74be62df5c86b
child 111200 82fd81257b821aa5e61d6ff3f4d402db1f4f263e
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewerspeterv
bugs798187
milestone19.0a1
Bug 798187 followup. Actually return our newly-created object from dictionary ToObject. r=peterv
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -5549,16 +5549,18 @@ class CGDictionary(CGThing):
             # NOTE: jsids are per-runtime, so don't use them in workers
             ("  if (!initedIds && !InitIds(cx)) {\n"
              "    return false;\n"
              "  }\n" if not self.workers else "") +
             "${toObjectParent}"
             "${ensureObject}"
             "\n"
             "${defineMembers}\n"
+            "\n"
+            "  *vp = JS::ObjectValue(*obj);\n"
             "  return true;\n"
             "}").substitute({
                 "selfName": self.makeClassName(d),
                 "initParent": CGIndenter(CGGeneric(initParent)).define(),
                 "initMembers": "\n\n".join(memberInits),
                 "idInit": CGIndenter(idinit).define(),
                 "isMainThread": toStringBool(not self.workers),
                 "toObjectParent": CGIndenter(CGGeneric(toObjectParent)).define(),