Open Bug 1444515 (xpidl-warts) Opened 6 years ago Updated 2 years ago

[meta] Fix warts in XPIDL to improve developer ergonomics

Categories

(Core :: XPConnect, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: bholley, Unassigned)

References

(Depends on 4 open bugs)

Details

(Keywords: meta)

There are various ergonomic issues with XPIDL that make it less-nice to use relative to WebIDL. This tempts developers to use WebIDL for internal interfaces, which has a negative impact on codesize (see [1]).

Now that extension compat is no longer a concern, we have a freer hand to modernize XPIDL in various ways. Some things, particularly complex types, are probably not tractable to implement - but others might be.

Suggestions welcome.

[1] https://groups.google.com/forum/#!topic/mozilla.dev.platform/ONHBIzzM7WU
Dealing with nsIArray from JS is not great and unfortunately the new web payments XPIDL interfaces use many arrays. Something like bug 380839 would help. In our case we really just want to be able to serialize the nsIPaymentRequest objects to a string (via JSON.stringify) to send across the process boundary so maybe just implementing toJSON for nsIArray would be good enough for us.
Depends on: 333459
(In reply to Matthew N. [:MattN] (PM if requests are blocking you) from comment #1)
> Dealing with nsIArray from JS is not great and unfortunately the new web
> payments XPIDL interfaces use many arrays. Something like bug 380839 would
> help. In our case we really just want to be able to serialize the
> nsIPaymentRequest objects to a string (via JSON.stringify) to send across
> the process boundary so maybe just implementing toJSON for nsIArray would be
> good enough for us.

Is marking parameters as [array] in XPIDL not suitable for this case?  Can you provide an example of what the interfaces involved look like for people unfamiliar with web payments?
Flags: needinfo?(MattN+bmo)
Depends on: 1444524
To keep this metabug clean, let's move the array discussion to bug 1444524.
Flags: needinfo?(MattN+bmo)
Depends on: 1444991
Depends on: 1455095
Depends on: 1526382
No longer depends on: 1526382
Depends on: 1509978
Depends on: 1651223
Depends on: 1659200
Depends on: 1721361
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.