Open Bug 1349375 Opened 7 years ago Updated 2 years ago

Consider switching XPIDL to WebIDL

Categories

(Core :: Internationalization, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: zbraniecki, Unassigned)

References

(Blocks 1 open bug)

Details

It seems like we have a direction set by the platform team to move away from xpidl toward webidl.

It should be easier for us as well since we work with arrays.

Not urgent, but worth tackling when we have time.
Priority: -- → P3
Dave, is that something you would recommend? I'm thinking about this change for LocaleService, OSPreferences and mozIntl.

Two main reasons to do this would be:

1) It would (if I understand?) enable us to expose APIs that return Promises and classes.
2) It's a general trend to replace XPIDL with WebIDL (or am I wrong?)
Flags: needinfo?(dtownsend)
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #1)
> Dave, is that something you would recommend? I'm thinking about this change
> for LocaleService, OSPreferences and mozIntl.

I'm not seeing an obvious reason to do this work right now.

> Two main reasons to do this would be:
> 
> 1) It would (if I understand?) enable us to expose APIs that return Promises
> and classes.

If you're having problems with these we should look at it but my understanding is that this should be possible with xpidl already.

> 2) It's a general trend to replace XPIDL with WebIDL (or am I wrong?)

This doesn't seem to be the case except in the case of performance, at least for the folks I talked to.
Flags: needinfo?(dtownsend)
I was actually thinking this should probably be WebIDL from the time it landed. The amount of code that had to be updated to use this service means that we're using it *a lot*, and the overhead is probably significant. It also probably means that we're repeatedly creating and then collecting reflectors for the service every time it's used from a different compartment.

(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #1)
> Dave, is that something you would recommend? I'm thinking about this change
> for LocaleService, OSPreferences and mozIntl.
> 
> Two main reasons to do this would be:
> 
> 1) It would (if I understand?) enable us to expose APIs that return Promises
> and classes.

It's possible to return promises from XPIDL interfaces, too. It's just a bit more difficult.
Kris offered to help me get this off the ground. No priority here, but once he has a moment he'll draft a scaffolding for a webidl and I'll migrate it.
Flags: needinfo?(kmaglione+bmo)
Flags: needinfo?(kmaglione+bmo)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.