Closed Bug 1020975 Opened 10 years ago Closed 5 years ago

No WebIDL overload allowed when extended attributes differ

Categories

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

32 Branch
x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: milan, Assigned: saschanaz)

References

Details

Attachments

(1 file)

Can't do something like this:

interface CanvasPattern {
  [Throws, LenientFloat]
  void setTransform(double a, double b, double c, double d, double e, double f);

  [Throws]
  void setTransform(SVGMatrix matrix);
};

the error is:

Extended attributes differ on different overloads of <unresolved scope>::setTransform...

Ehsan suggested this is a bug, so here we go.
This probably is We have no particular plans to change this behavior at this time.  It would require storing separate extended attribute sets for each signature of the overload set, and many extended attributes don't make sense on a per-overload basis.

In this case, you can simply put LenientFloat on the second overload, of course.
Er, ignore the "This probably is" bit above.
Yes, not really blocking any work.  On a side note, can't actually put LenientFloat on the second override, we get a different error :)
> we get a different error

Er... which one?
(In reply to Boris Zbarsky [:bz] from comment #4)
> > we get a different error
> 
> Er... which one?

"[LenientFloat] used on an operation with no restricted float type arguments" from WebIDL.py.
> "[LenientFloat] used on an operation with no restricted float type arguments"

Ah.  We should relax that for the overload case, I guess, and either do that check once we have all the overloads or allow [LenientFloat] to be specified on some overloads but not others and make sure it ends up on the operation if it's on any of the overloads.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML

This assumes that LenientFloat won't break float-less overload behavior.

Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5161e20b698e
Allow LenientFloat to be only in a specific overload r=bzbarsky
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → saschanaz
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: