Bug 1543461. Add the missing newline after a static assert in Web IDL codegen. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 10 Apr 2019 19:05:15 +0000
changeset 468921 e93e17bb399ae84a0f80ab7e3974cd0495d13cdf
parent 468920 148b08e319b35670d0c8f91d1113a4af0f827f34
child 468922 aa0feb50773a391760802da8121742653321d1ce
push id112762
push useraciure@mozilla.com
push dateThu, 11 Apr 2019 09:57:48 +0000
treeherdermozilla-inbound@0b4aefa9f91c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1543461
milestone68.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 1543461. Add the missing newline after a static assert in Web IDL codegen. r=peterv Differential Revision: https://phabricator.services.mozilla.com/D26960
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -5668,17 +5668,21 @@ def getJSToNativeConversionInfo(type, de
         else:
             if forceOwningType:
                 declType = "OwningNonNull<" + typeName + ">"
             else:
                 declType = "NonNull<" + typeName + ">"
 
         templateBody = ""
         if forceOwningType:
-            templateBody += 'static_assert(IsRefcounted<%s>::value, "We can only store refcounted classes.");' % typeName
+            templateBody += fill(
+                """
+                static_assert(IsRefcounted<${typeName}>::value, "We can only store refcounted classes.");
+                """,
+                typeName=typeName)
 
         if (not descriptor.interface.isConsequential() and
             not descriptor.interface.isExternal()):
             if failureCode is not None:
                 templateBody += str(CastableObjectUnwrapper(
                     descriptor,
                     "${val}",
                     "${maybeMutableVal}",