Closed Bug 847928 Opened 11 years ago Closed 11 years ago

Element type of a WebIDL array must not be a sequence or dictionary type.

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: pranavrc, Assigned: pranavrc)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch Possible patch (obsolete) — Splinter Review
http://dev.w3.org/2006/webapi/WebIDL/#idl-array

The spec details that an array type must not contain a dictionary or sequence as its element type. This needs to be implemented in the WebIDL parser.
Assignee: nobody → prp.1111
Attachment #721233 - Flags: feedback?(bzbarsky)
Comment on attachment 721233 [details] [diff] [review]
Possible patch

> +        assert not self.isDictionary()

Why?  Nothing prevents that.  This should be a WebIDLError, not an assert.  What's the actual exception thrown in your test here?

Further, I think you should be testing self.inner.isDictionary(), not self.isDictionary().  If self.isDictionary() ever returns true for an IDLArrayType, that's just broken.
Attachment #721233 - Flags: feedback?(bzbarsky) → feedback+
Attached patch Patch v2 (obsolete) — Splinter Review
Here's the WebIDLError raised:

error: Array type must not contain dictionary as element type., <unknown> line 7:12
            Foo[] b;
            ^
Attachment #721233 - Attachment is obsolete: true
Attachment #721321 - Flags: feedback?(bzbarsky)
Comment on attachment 721321 [details] [diff] [review]
Patch v2

Looks great.  Please put the bug number and reviewer in your commit message, though.
Attachment #721321 - Flags: review+
Attachment #721321 - Flags: feedback?(bzbarsky)
Attachment #721321 - Flags: feedback+
Attached patch Patch v3Splinter Review
Attachment #721321 - Attachment is obsolete: true
Attachment #721329 - Flags: review?(bzbarsky)
Comment on attachment 721329 [details] [diff] [review]
Patch v3

r=me
Attachment #721329 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/ddf8cdc9d2e3
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: