Closed Bug 851584 Opened 9 years ago Closed 9 years ago

DOM bindings example generator generates two Length() methods for array like interfaces

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: jst, Assigned: bzbarsky)

Details

Attachments

(1 file)

Given the WebIDL:

interface MimeTypeArray {
  readonly attribute unsigned long length;

  getter MimeType? item(unsigned long index);
  getter MimeType? namedItem(DOMString name);
};

I get this output in the example header:

  uint32_t Length() const;

  nsMimeType* Item(uint32_t index);

  nsMimeType* NamedItem(const nsAString& name);

  nsMimeType* IndexedGetter(uint32_t index, bool &found);

  nsMimeType* NamedGetter(const nsAString& name, bool &found);

  uint32_t Length();

  void GetSupportedNames(nsTArray< nsString >& retval);

which of course is one Length() method too many.
Assignee: nobody → bzbarsky
Attachment #725699 - Flags: review?(jst) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/13fb55ee93bb
Flags: in-testsuite-
Target Milestone: --- → mozilla22
https://hg.mozilla.org/mozilla-central/rev/13fb55ee93bb
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.