Closed Bug 1286024 Opened 9 years ago Closed 9 years ago

2,300 instances of "No Document in SetRequestContext; can not query loadgroup; sending reports may fail." emitted from dom/security/nsCSPContext.cpp during linux64 debug testing

Categories

(Core :: DOM: Security, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: erahm, Assigned: tnguyen)

References

(Blocks 1 open bug)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

> 2271 WARNING: No Document in SetRequestContext; can not query loadgroup; sending reports may fail.: file dom/security/nsCSPContext.cpp, line 651 This warning [1] shows up in the following test suites: > 412 - [TC] Linux64 cppunit Cpp > 177 - [TC] Linux64 mochitest-7 7 > 174 - [TC] Linux64 mochitest-plain-e10s-7 7 > 169 - [TC] Linux64 web-platform-tests-12 12 > 169 - [TC] Linux64 web-platform-tests-e10s-12 12 > 104 - [TC] Linux64 crashtest C > 104 - [TC] Linux64 crashtest e10s C > 97 - [TC] Linux64 mochitest-plain-e10s-4 4 > 97 - [TC] Linux64 mochitest-4 4 > 73 - [TC] Linux64 mochitest-plain-e10s-6 6 > 73 - [TC] Linux64 mochitest-6 6 > 68 - [TC] Linux64 web-platform-tests-4 4 > 68 - [TC] Linux64 web-platform-tests-e10s-4 4 > 50 - [TC] Linux64 web-platform-tests-5 5 > 50 - [TC] Linux64 web-platform-tests-e10s-5 5 > 38 - [TC] Linux64 mochitest-3 3 > 37 - [TC] Linux64 web-platform-tests-e10s-2 2 > 37 - [TC] Linux64 web-platform-tests-2 2 > 34 - [TC] Linux64 mochitest-plain-e10s-2 2 > 31 - [TC] Linux64 mochitest-plain-e10s-3 3 > 28 - [TC] Linux64 mochitest-2 2 > 20 - [TC] Linux64 mochitest-plain-e10s-5 5 > 19 - [TC] Linux64 web-platform-tests-9 9 > 19 - [TC] Linux64 web-platform-tests-e10s-9 9 > 18 - [TC] Linux64 mochitest-5 5 > 10 - [TC] Linux64 mochitest-devtools-chrome-9 dt9 > 8 - [TC] Linux64 web-platform-tests-e10s-3 3 > 8 - [TC] Linux64 web-platform-tests-3 3 > 7 - [TC] Linux64 web-platform-tests-e10s-7 7 > 7 - [TC] Linux64 web-platform-tests-7 7 > 6 - [TC] Linux64 mochitest-gl-e10s gl > 6 - [TC] Linux64 mochitest-browser-chrome-1 bc1 > 5 - [TC] Linux64 mochitest-plain-e10s-10 10 > 5 - [TC] Linux64 mochitest-browser-chrome-e10s-3 bc3 > 5 - [TC] Linux64 mochitest-10 10 > 4 - [TC] Linux64 mochitest-browser-chrome-3 bc3 > 4 - [TC] Linux64 web-platform-tests-e10s-1 1 > 4 - [TC] Linux64 web-platform-tests-1 1 > 3 - [TC] Linux64 mochitest-browser-chrome-e10s-2 bc2 > 2 - [TC] Linux64 mochitest-devtools-chrome-10 dt10 > 2 - [TC] Linux64 web-platform-tests-e10s-11 11 > 2 - [TC] Linux64 mochitest-browser-chrome-e10s-1 bc1 > 2 - [TC] Linux64 web-platform-tests-11 11 > 2 - [TC] Linux64 mochitest-chrome-2 c2 > 1 - [TC] Linux64 mochitest-media mda > 1 - [TC] Linux64 mochitest-chrome-3 c3 > 1 - [TC] Linux64 mochitest-gl gl > 1 - [TC] Linux64 mochitest-browser-chrome-e10s-4 bc4 > 1 - [TC] Linux64 mochitest-browser-chrome-e10s-6 bc6 > 1 - [TC] Linux64 mochitest-9 9 > 1 - [TC] Linux64 mochitest-media-e10s mda > 1 - [TC] Linux64 firefox-ui-tests functional remote e10s en-US > 1 - [TC] Linux64 web-platform-tests-e10s-10 10 > 1 - [TC] Linux64 mochitest-browser-chrome-2 bc2 > 1 - [TC] Linux64 firefox-ui-tests functional remote en-US > 1 - [TC] Linux64 web-platform-tests-10 10 > 1 - [TC] Linux64 mochitest-plain-e10s-9 9 It shows up in 1170 tests. A few of the most prevalent: > 412 - TestCSPParser > 99 - file:///home/worker/workspace/build/tests/reftest/tests/dom/workers/test/crashtests/1228456.html > 99 - [e10s] file:///home/worker/workspace/build/tests/reftest/tests/dom/workers/test/crashtests/1228456.html > 15 - [e10s] dom/workers/test/test_fibonacci.html > 15 - dom/workers/test/test_fibonacci.html > 12 - [e10s] dom/workers/test/test_errorwarning.html > 12 - [e10s] dom/workers/test/test_importScripts_3rdparty.html > 12 - dom/workers/test/test_errorwarning.html > 12 - dom/workers/test/test_importScripts_3rdparty.html > 10 - /html/infrastructure/urls/resolving-urls/query-encoding/utf-16be.html [1] https://hg.mozilla.org/mozilla-central/annotate/214884d507ee/dom/security/nsCSPContext.cpp#l651
Blocks: 959388
Flags: needinfo?(tnguyen)
Hmm, that's a warning due to CSP was set request to principal, not document. This is exactly in the case CSP is not inherited from parent (or document) but delivered from HTTP header. Apparently, we could not use document in [1] to prevent unexpected csp inheritance. I am thinking to remove this warning (use LOG instead), but still not quite sure what's said in the warning "can not query loadgroup; sending reports may fail.". Perhaps I have to write some tests about sending reports to see what will happen. [1] https://dxr.mozilla.org/mozilla-central/source/dom/workers/ScriptLoader.cpp#1182
Flags: needinfo?(tnguyen)
Thomas, no need to write testcases. Since we now have support for CSP in workers that warning is not quite accurate anymore, since we 'most likely' will not have a doc available for all the different worker scenarios. Just remove or replace with a log is fine. Feel free to flag me for review. [1] https://dxr.mozilla.org/mozilla-central/source/dom/security/nsCSPContext.cpp?q=NS_WARNING%28%22No+Document+in+SetRequestContext%3B+can+not+query+loadgroup%3B+sending+reports+may+fail.%22%29%3B&redirect_type=single#651
Flags: needinfo?(tnguyen)
Assignee: nobody → tnguyen
Status: NEW → ASSIGNED
Whiteboard: [domsecurity-active]
MozReview-Commit-ID: IitqAt0iLQF
Flags: needinfo?(tnguyen)
Attachment #8770071 - Flags: review?(ckerschb)
Comment on attachment 8770071 [details] [diff] [review] Replace no document in SetRequestContext warning with a log Review of attachment 8770071 [details] [diff] [review]: ----------------------------------------------------------------- Thanks Thomas, r=me
Attachment #8770071 - Flags: review?(ckerschb) → review+
Keywords: checkin-needed
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/8033414023e2 Replace no document in SetRequestContext warning with a log. r=ckerschb
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: