The default bug view has changed. See this FAQ.

Fix distinguishability checking for dictionaries

RESOLVED FIXED in mozilla16

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

(Blocks: 1 bug)

unspecified
mozilla16
x86
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

I failed to do this right in bug 742153.
Created attachment 633013 [details] [diff] [review]
Fix isDistinguishableFrom for dictionaries to work right.

While writing this, I discovered that isCallback() is false in IDLWrapperType (which makes sense) but that we had consumers checking isCallback() on types and assuming that would catch callback interfaces.  So I added better ways of testing for that and used them throughout.
Attachment #633013 - Flags: review?(khuey)
Created attachment 634275 [details] [diff] [review]
Fix isDistinguishableFrom for dictionaries to work right.
Attachment #634275 - Flags: review?(khuey)
Attachment #633013 - Attachment is obsolete: true
Attachment #633013 - Flags: review?(khuey)
Comment on attachment 634275 [details] [diff] [review]
Fix isDistinguishableFrom for dictionaries to work right.

Peter, Kyle is apparently swamped again.  Could you take a look?  I mostly want this because it cleans up the callback stuff a lot...  Kyle did already OK the general idea.
Attachment #634275 - Flags: review?(khuey) → review?(peterv)
Comment on attachment 634275 [details] [diff] [review]
Fix isDistinguishableFrom for dictionaries to work right.

Review of attachment 634275 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bindings/parser/WebIDL.py
@@ +1267,5 @@
>          if other.isPrimitive() or other.isString() or other.isEnum():
>              return True
> +        if self.isDictionary():
> +            return (other.isNonCallbackInterface() or other.isSequence() or
> +                    other.isArray())

or isDate()?
Attachment #634275 - Flags: review?(peterv) → review+
> or isDate()?

Yes, good catch.  That column was off the right edge of my browser viewport.  ;)
https://hg.mozilla.org/integration/mozilla-inbound/rev/da942dd41b43
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/da942dd41b43
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.