Fix missing triggeringPrincipal from android code

NEW
Unassigned

Status

()

enhancement
P2
normal
7 months ago
4 months ago

People

(Reporter: jkt, Unassigned)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

7 months ago
In Bug 1490257 we made a carve out for the asserts for android. This is mainly due to browser.js in android browsers not passing triggering principals in most places.

This bug is so we follow up on that and require this everywhere.

Some notes: It seems we don't have the right principal on all of android, within Bug 1513241 I encountered some of those problems, see also [1].

Within this Bug we should update loadURIOptions.webidl and change the principal setting to:

required Principal? triggeringPrincipal;

If we do that currently, we face problems like [1], in detail:

0 loadURI/<() ["chrome://global/content/elements/browser-custom-element.js":809:6]
1 _wrapURIChangeCall() ["chrome://global/content/elements/browser-custom-element.js":749:8]
2 loadURI() ["chrome://global/content/elements/browser-custom-element.js":808:4]
3 create() ["chrome://browser/content/browser.js":3855:8]
4 Tab() ["chrome://browser/content/browser.js":3642:2]
5 addTab() ["chrome://browser/content/browser.js":1216:17]
6 onEvent() ["chrome://browser/content/browser.js":1965:10]
Handled load error: TypeError: Missing required 'triggeringPrincipal' member of LoadURIOptions

It seems that |this.browser.contentPrincipal| within mobile/android/chrome/content/browser.js is null. So probably we should start digging there.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=61ab3e53d35dba0a5db9c20394a7000cd301bef7

You need to log in before you can comment on or make changes to this bug.