Closed Bug 1873386 Opened 1 years ago Closed 1 year ago

Remove or fix references to non-scriptable interfaces from scriptable ones

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: zombie, Assigned: zombie)

References

Details

(Whiteboard: [addons-jira])

Attachments

(2 files)

Patch from bug 1872918 found a few non-scriptable interfaces referenced from scriptable ones:

interface nsIAsyncVerifyRedirectReadyCallback {}
interface nsICRLiteTimestamp {}
interface nsIWebAuthnRegisterArgs {}
interface nsIWebAuthnRegisterPromise {}
interface nsIWebAuthnSignArgs {}
interface nsIWebAuthnSignPromise {}

At least some look like they're meant to be [scriptable], but it's not 100% clear, so filing this as a followup to investigate and fix.

A more complete list:

interface nsIAsyncVerifyRedirectReadyCallback {}
interface nsICRLiteTimestamp {}
interface nsIInputAvailableCallback {}
interface nsIScriptElement {}
interface nsIThreadObserver {}
interface nsIUDPSocketSyncListener {}
interface nsIWebAuthnRegisterArgs {}
interface nsIWebAuthnRegisterPromise {}
interface nsIWebAuthnSignArgs {}
interface nsIWebAuthnSignPromise {}
interface nsIXPCScriptable {}

I guess this means a method that takes this kind of argument can't actually be called nor implemented by script. XPCWrappedNative::GatherProtoScriptable() is one use of one of these methods (nsIXPCScriptable is used by getScriptableHelper()), and it handles the method not working, so it looks like that is intentional.

Summary: Reomove or fix non-scriptable interfaces referenced from scriptable ones → Remove or fix non-scriptable interfaces referenced from scriptable ones

We could require methods or attributes on scriptable interfaces that include non-scriptable arguments or return values be marked noscript maybe. I'm not sure how annoying that check would be to do.

Summary: Remove or fix non-scriptable interfaces referenced from scriptable ones → Remove or fix references to non-scriptable interfaces from scriptable ones
Blocks: 1873777
No longer blocks: 1873777

(In reply to Andrew McCreight [:mccr8] from comment #3)

We could require methods or attributes on scriptable interfaces that include non-scriptable arguments or return values be marked noscript maybe. I'm not sure how annoying that check would be to do.

This is what I would like us to do.

Assignee: nobody → tomica
Status: NEW → ASSIGNED
Whiteboard: [addons-jira]
Blocks: 1881748
No longer blocks: 1872918
Depends on: 1872918
No longer blocks: 1881748
Depends on: 1881748
Attachment #9380728 - Attachment description: Bug 1873386 - Interfaces referenced from scriptable members need to be [scriptable] r?nika → Bug 1873386 - Interfaces referenced from scriptable members need to be [scriptable] r?mccr8
Pushed by tjovanovic@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0102cdec251f Interfaces referenced from scriptable members need to be [scriptable] r=necko-reviewers,jschanck,mccr8,valentin https://hg.mozilla.org/integration/autoland/rev/a951e19e6158 Drop unused nsIStreamTransportService::InputAvailable and nsIInputAvailableCallback r=kershaw,necko-reviewers
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Regressions: 1890700
Regressions: 1891989
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: