gecko-dev/dom/script
Kris Maglione 5fdcb5a5d2 Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a loading
principal currently retrieve it from the context node. Since no current
callers require the principal to be the loading principal, and some already
expect it to be the triggering principal (which there's currently no other way
to retrieve), I chose to pass the triggering principal whenever possible, but
use the loading principal to determine the origin URL.

As a follow-up, I'd like to change the nsIContentPolicy interface to
explicitly receive loading and triggering principals, or possibly just
LoadInfo instances, rather than poorly-defined request
origin/principal/context args. But since that may cause trouble for
comm-central, I'd rather not do it as part of this bug.

MozReview-Commit-ID: LqD9GxdzMte

--HG--
extra : rebase_source : 41ce439912ae7b895e0a3b0e660fa6ba571eb50f
2017-10-12 15:43:55 -07:00
..
ModuleLoadRequest.cpp Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv 2017-08-29 16:02:48 -07:00
ModuleLoadRequest.h Bug Bug 1388728 - Update module loader error handling to match the spec r=bkelly 2017-08-22 10:34:14 +01:00
ModuleScript.cpp Bug Bug 1388728 - Update module loader error handling to match the spec r=bkelly 2017-08-22 10:34:14 +01:00
ModuleScript.h Bug Bug 1388728 - Update module loader error handling to match the spec r=bkelly 2017-08-22 10:34:14 +01:00
ScriptElement.cpp Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro. 2017-10-03 09:05:19 +11:00
ScriptElement.h Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan 2017-05-08 08:24:22 +02:00
ScriptLoadHandler.cpp Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen 2017-06-18 20:37:50 +09:00
ScriptLoadHandler.h Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor. 2017-06-13 13:23:23 +03:00
ScriptLoadRequest.cpp Bug 1053321 - Correctly pass info about 'defer' and 'async' attributes to HTML5 parser invoked script preload. r=bkelly 2017-08-19 05:35:00 -04:00
ScriptLoadRequest.h Bug 1406278: Part 3 - Use subject principal as triggering principal in <script> "src" attribute. r=bz 2017-10-04 22:16:32 -07:00
ScriptLoader.cpp Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
ScriptLoader.h Bug 1390863 - Do not hold ScriptLoadRequest, when the load-end event is not fired. r=mrbkap 2017-08-22 18:06:37 +00:00
ScriptSettings.cpp Bug 1378092 - Consider to remove MaybeGC from AutoEntryScript::~AutoEntryScript(), r=jonco 2017-09-07 09:28:25 +01:00
ScriptSettings.h Bug 1379585 part 1 - Add an RAII class for auto disable interrupt callback. r=baku 2017-07-14 10:02:59 +10:00
ScriptTrace.cpp Bug 1362119 - part 2 - Splitting ScriptLoader in multiple files, r=ehsan 2017-05-08 08:24:44 +02:00
ScriptTrace.h Bug 1362119 - part 2 - Splitting ScriptLoader in multiple files, r=ehsan 2017-05-08 08:24:44 +02:00
moz.build Backed out changeset 20344f0dbff9 (bug 1053321) for ESLint failures. 2017-08-01 16:14:01 -04:00
nsIScriptElement.h Bug 1406278: Part 3 - Use subject principal as triggering principal in <script> "src" attribute. r=bz 2017-10-04 22:16:32 -07:00
nsIScriptLoaderObserver.idl Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan 2017-05-08 08:24:22 +02:00