Closed Bug 1570115 Opened 6 months ago Closed 4 months ago

Allow Actors to set |loadURIDelegate| and |webBrowserChrome| on docShell


(Core :: DOM: Navigation, task, P1)




Tracking Status
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- fixed


(Reporter: Agi, Assigned: Agi)


(Blocks 2 open bugs)


(Whiteboard: [geckoview:m1909])


(4 files, 1 obsolete file)

loadURIDelegate and webBrowserChrome are set on the docShell inside frame scripts (here on Desktop and here on GeckoView). We need a way to let docShell discover these delegates when they are implented as an Actor.

kmag suggested we use a named Actor that gets loaded by the docShell whenever it needs to use the property.

Note we should probably allow explicitly setting webBrowserChrome, at least for now, and fall back to looking up an actor only if hasn't already been set on the top-level content docshell.

Ideally, I think we want to move to using the same actor everywhere, but for the moment, we still use something slightly different for extension panels, and in-process tabs do some magic to use XULBrowserWindow for their nsIWebBrowserChrome3.

Thanks Agi for taking this.

Assignee: nobody → agi
Priority: -- → P2

firefox69=wontfix because we don't need to uplift this fix to Beta.

OS: Unspecified → Android
Whiteboard: [geckoview] → [geckoview:p2]
Blocks: 1548377

This allows querying the actor for interfaces implemented in JS.

Adding this bug to GV's September sprint. Agi says his patches are waiting for review.

Priority: P2 → P1
Whiteboard: [geckoview:p2] → [geckoview:m1909]

When DelegatedQueryInterface is called on a XPCWrappedJS that has an aggregated
native object (e.g. in the case of a JS-implemented class that extends a native
object like JSWindowActor), we end up calling QueryInterface on the native
object, even though we know already that the interface is implemented on the JS

To fix this, we bypass the native object QI call by calling

Attachment #9089208 - Attachment description: Bug 1570115 - Add QueryInterfaceActor to JSWindowActor. → Bug 1570115 - Add do_QueryActor to query JS-implemented interfaces.
Attachment #9091614 - Attachment is obsolete: true
Blocks: 1582150
Pushed by
Add default handler for OnLoad{Request,Error}. r=droeh
Add do_QueryActor to query JS-implemented interfaces. r=kmag
Move LoadURIDelegate to Actor. r=kmag,snorp
Allow Actors to implement WebBrowserChrome. r=kmag,snorp
Regressions: 1583378
You need to log in before you can comment on or make changes to this bug.