Open Bug 1832301 Opened 2 years ago Updated 1 year ago

location.origin not set if using resource://android/assets/...

Categories

(GeckoView :: General, defect, P3)

Firefox 114
All
Android
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: jw, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Steps to reproduce:

Since the loading of webpages from the "resource" folder of an Android app in Geckoview was fixed (in https://bugzilla.mozilla.org/show_bug.cgi?id=1812356), the window.location.origin property is incorrectly set as "null".

This doesn't look right, and causes sites which expect the origin to be non-null to fail.

In the last working version of Geckoview prior to the issue fixed in bug 1812356 (which was Geckoview v108), this wasn't the case and the origin was populated with "resource://android".

Please, can this be made the case again.

Hey Makoto, how difficult is this? If it won't take much time can you bump it to a P2?

Severity: -- → S3
Flags: needinfo?(m_kato)
Priority: -- → P3
See Also: → 1836457

I guess that this URL has no URI_HAS_WEB_EXPOSED_ORIGIN since this is Jar. The origin of resource://android URL won't be used in Fenix/Focus. So I don't think this is P2.

If we fix this, nsContentUtils::GetWebExposedOriginSerialization needs a special hack for resource://android, or need more check etc for SubstitutingJARURI.

Flags: needinfo?(m_kato)
Component: Core → General
You need to log in before you can comment on or make changes to this bug.