Fix up indentation of the generated code for event handler return values. No bug.
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 28 Nov 2012 02:33:50 -0500
changeset 114338 958eab8fe85a06a46595441d5f91a52eb1b87d50
parent 114337 e153295a107e36852d73ce6f0642be7abab0cd42
child 114339 b49f84c2c1112ea4b41cc87405e9af76d895d2a7
push id23913
push useremorley@mozilla.com
push dateWed, 28 Nov 2012 17:11:31 +0000
treeherdermozilla-central@17c267a881cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone20.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
Fix up indentation of the generated code for event handler return values. No bug.
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -3259,19 +3259,19 @@ if (!%(resultStr)s) {
         # See comments in WrapNewBindingObject explaining why we need
         # to wrap here.
         # NB: setValue(..., True) calls JS_WrapValue(), so is fallible
         if descriptorProvider.workers:
             return (setValue("JS::ObjectOrNullValue(%s)" % result, True), False)
 
         wrapCode = (("if (%(result)s) {\n" +
                      CGIndenter(CGGeneric(setValue(
-                            "JS::ObjectValue(*%(result)s->Callable())", True))).define() +
+                            "JS::ObjectValue(*%(result)s->Callable())", True))).define() + "\n"
                      "} else {\n" +
-                     setValue("JS::NullValue()") +
+                     CGIndenter(CGGeneric(setValue("JS::NullValue()"))).define() + "\n"
                      "}") % { "result": result })
         return wrapCode, False
 
     if type.tag() == IDLType.Tags.any:
         # See comments in WrapNewBindingObject explaining why we need
         # to wrap here.
         # NB: setValue(..., True) calls JS_WrapValue(), so is fallible
         return (setValue(result, True), False)