Open Bug 750309 Opened 12 years ago Updated 2 years ago

Argument unwrapping for Paris binding objects doesn't fall back if they're preffed off

Categories

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

x86
macOS
defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

Details

So if a Paris binding is preffed off, calling methods that take arguments of that type will throw.  Not an issue yet, but might become one for bug 750297.

On the other hand, maybe we should make those objects not prefable?  They'll be fairly low risk in terms of the actual binding (e.g. WebGLUniformLocation doesn't have anything on the interface at all).
Peter, thoughts?  It does feel like we'll need fallback here in general...
Yeah, falling back seems sensible.
So one problem is that for non-nullable stuff the actual signature is different for new-binding objects vs external objects right now (Foo& vs Foo*).

Furthermore, for new-binding objects we unwrap to the concrete class but for non-new-binding objects we can only unwrap to interfaces...

This is quite a bit of a pain.  :(

I can probably avoid it for webgl by just avoiding prefability for my arg objects, but once we get to nodes we'll run into a problem, since XHR can take a document arg to send().

I guess one option once we have unions is to treat prefable args as a union of the preffed-on and preffed-off versions.  But that's _really_ ugly.
I'm just going to disallow unwrapping of castable prefable arguments in bug 750297 for now.  If/when we need it, we can revisit, but at least for now we won't silently generate incorrect code.
No longer blocks: 750297
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
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.