Closed Bug 1570115 Opened 6 months ago Closed 4 months ago

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

Categories

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

Unspecified
Android
task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- fixed

People

(Reporter: Agi, Assigned: Agi)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [geckoview:m1909])

Attachments

(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
Status: NEW → ASSIGNED
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
object.

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

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 asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84bd781b0b8c
Add default handler for OnLoad{Request,Error}. r=droeh
https://hg.mozilla.org/integration/autoland/rev/3626cfe835ee
Add do_QueryActor to query JS-implemented interfaces. r=kmag
https://hg.mozilla.org/integration/autoland/rev/c6ac454bfe48
Move LoadURIDelegate to Actor. r=kmag,snorp
https://hg.mozilla.org/integration/autoland/rev/205690af8630
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.