Add the missing newline on our refcounted-class static assert in bindings

RESOLVED FIXED in Firefox 68

Status

()

defect
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

(Regression)

Trunk
mozilla68
Points:
---

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

The static assert at https://searchfox.org/mozilla-central/rev/dd7e27f4a805e4115d0dbee70e1220b23b23c567/dom/bindings/Codegen.py#5676 is missing a newline at the end, so the codegen ends up looking something like this:

    OwningNonNull<mozilla::dom::HTMLImageElement>& memberSlot = RawSetAsHTMLImageElement();
    static_assert(IsRefcounted<mozilla::dom::HTMLImageElement>::value, "We can only store refcounted classes.");{
      // Our JSContext should be in the right global to do unwrapping in.
      nsresult rv = UnwrapObject<prototypes::id::HTMLImageElement, mozilla::dom::HTMLImageElement>(value, memberSlot, cx);

Note that { after the ;' That spacing really confused me for a few minutes when trying to read some generated code.

Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e93e17bb399a
Add the missing newline after a static assert in Web IDL codegen.  r=peterv
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.