Closed Bug 1753025 Opened 2 years ago Closed 2 years ago

Using the correct principal to create channel for ServiceWorker NavigationPreload.

Categories

(Core :: DOM: Service Workers, defect, P1)

defect

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: edenchuang, Assigned: edenchuang)

References

Details

Attachments

(2 files)

No description provided.
Assignee: nobody → echuang
Severity: -- → S2
Priority: -- → P1
Blocks: 1750515

Currently using the pricinpal of InternalRequest to create the channel for NavigationPreload.
However, it is not a correct principal and makes NavigationPreload stop with channel security checking.
Instead of using the principal of InternalRequest, this patch uses the loadingPrincipal of InterceptedHttpChannel to create the channel.

Pushed by echuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/90e9e803f010
Using correct principal to create channel for NavigationPreload. r=dom-worker-reviewers,jesup
https://hg.mozilla.org/integration/autoland/rev/09f9724c8c1c
Adding debugging log for FetchSerivce/FetchInstance. r=dom-worker-reviewers,jesup
Flags: needinfo?(echuang)
Backout by apavel@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/ff0c5f5b0a60
Backed out 3 changesets (bug 1753025, bug 1750515) for causing build bustages on Logging.h a=backout
Pushed by echuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99bacb6a3d92
Using correct principal to create channel for NavigationPreload. r=dom-worker-reviewers,jesup
https://hg.mozilla.org/integration/autoland/rev/f671d5206b88
Adding debugging log for FetchSerivce/FetchInstance. r=dom-worker-reviewers,jesup

Backed out 3 changesets (Bug 1750515, Bug 1753025) for causing wpt failures on idlharness.https.any.<...>.
Backout link
Push with failures
Failure Log

Flags: needinfo?(echuang)
Flags: needinfo?(echuang)
Blocks: 1754365
Pushed by echuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7692c70b812d
Using correct principal to create channel for NavigationPreload. r=dom-worker-reviewers,jesup
https://hg.mozilla.org/integration/autoland/rev/fb5026c2f822
Adding debugging log for FetchSerivce/FetchInstance. r=dom-worker-reviewers,jesup
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Regressions: 1754786

Comment on attachment 9261807 [details]
Bug 1753025 - Using correct principal to create channel for NavigationPreload. r=#dom-worker-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: If the user turns on NavigationPreload, it could make NavigationPreload fail due to using the wrong principal to create a channel.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Currently, NavigationPreload should be turned on manually. NavigationPreload fails would not cause ServiceWorker interception to fail, but it cannot gain the performance by NavigationPreload.
  • String changes made/needed: No
Attachment #9261807 - Flags: approval-mozilla-beta?
Attachment #9261812 - Flags: approval-mozilla-beta?

Eden, could you explain how this is impacting our 98 release? I see this is blocking a feature that landed in 99 and is nightly only. Thanks

Flags: needinfo?(echuang)

Pascal, thanks for ni. Yes, after discussion, we decide to make the feature be on with 98 release in default.
To make this feature be turned on, we need to uplift patches of this bug, and also bug 1750515 and bug 1754786. This is because we changed the test expectation result in these patches.
Patches in this bug have no dependency on other bugs for uplifting, so this is the first one to uplift. Then the patches on bug 1750515 and bug 1754786.

Flags: needinfo?(echuang)

Comment on attachment 9261807 [details]
Bug 1753025 - Using correct principal to create channel for NavigationPreload. r=#dom-worker-reviewers

The feature is now targeting 99

Attachment #9261807 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #9261812 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: