Closed Bug 1627963 Opened 4 years ago Closed 4 years ago

CSP and Fission: ShouldLoad should not rely on requestingContext because it's not available in the parent process

Categories

(Core :: DOM: Security, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla77
Fission Milestone M6
Tracking Status
firefox77 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

Since we want to make CSP fully fission compatible we should move away passing requestContext to shoudLoad.

Priority: -- → P2

Matt, it seems the requestingContext within the actual CSP code is only used for querying if a script was parserCreated. We could move that bit of information into the loadinfo which brings us closer to CSP handling in the parent.

Just confirming, would you sign off on adding a bool parserCreated to loadinfo? If you agree, then I'll get that patch ready.

Flags: needinfo?(matt.woodrow)

(In reply to Christoph Kerschbaumer [:ckerschb] from comment #1)

Matt, it seems the requestingContext within the actual CSP code is only used for querying if a script was parserCreated. We could move that bit of information into the loadinfo which brings us closer to CSP handling in the parent.

Just confirming, would you sign off on adding a bool parserCreated to loadinfo? If you agree, then I'll get that patch ready.

Yes, I think that's the right way to solve this.

Flags: needinfo?(matt.woodrow)
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/55c37e8a6563
Remove requestContext from CSP shouldload and replace with fission friendly primitives. r=mattwoodrow

Backed out changeset 55c37e8a6563 (bug 1627963) for test_csp_reports.js failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=windows%2C10%2Cx64%2Cdebug%2Cxpcshell%2Ctests%2Ctest-windows10-64%2Fdebug-xpcshell-e10s-2%2Cx%28x2%29&fromchange=9e08318148efc28233ef62b6ccb83011c6a1cf43&tochange=b0496779c7cde65032214c2d3905cb7e42148f4f&selectedJob=296922921

Backout link: https://hg.mozilla.org/integration/autoland/rev/b0496779c7cde65032214c2d3905cb7e42148f4f

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=296922921&repo=autoland&lineNumber=4858

[task 2020-04-09T10:01:08.417Z] 10:01:08     INFO -  TEST-START | dom/security/test/unit/test_csp_reports.js
[task 2020-04-09T10:06:08.422Z] 10:06:08  WARNING -  TEST-UNEXPECTED-TIMEOUT | dom/security/test/unit/test_csp_reports.js | Test timed out
[task 2020-04-09T10:06:08.422Z] 10:06:08     INFO -  TEST-INFO took 300000ms
Flags: needinfo?(ckerschb)

(In reply to Bogdan Tara[:bogdan_tara | bogdant] from comment #5)

[task 2020-04-09T10:01:08.417Z] 10:01:08 INFO - TEST-START | dom/security/test/unit/test_csp_reports.js

Ah, that test calls ShouldLoad directly :-(

I'll update - thanks!

Flags: needinfo?(ckerschb)

M6

Fission Milestone: --- → M6
Pushed by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c95cc5cdca16
Remove requestContext from CSP shouldload and replace with fission friendly primitives. r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: