зеркало из https://github.com/mozilla/gecko-dev.git
5fdcb5a5d2
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 |
||
---|---|---|
.. | ||
ModuleLoadRequest.cpp | ||
ModuleLoadRequest.h | ||
ModuleScript.cpp | ||
ModuleScript.h | ||
ScriptElement.cpp | ||
ScriptElement.h | ||
ScriptLoadHandler.cpp | ||
ScriptLoadHandler.h | ||
ScriptLoadRequest.cpp | ||
ScriptLoadRequest.h | ||
ScriptLoader.cpp | ||
ScriptLoader.h | ||
ScriptSettings.cpp | ||
ScriptSettings.h | ||
ScriptTrace.cpp | ||
ScriptTrace.h | ||
moz.build | ||
nsIScriptElement.h | ||
nsIScriptLoaderObserver.idl |