зеркало из 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 |
||
---|---|---|
.. | ||
crashtests | ||
resources | ||
test | ||
CDATASection.cpp | ||
CDATASection.h | ||
ProcessingInstruction.cpp | ||
ProcessingInstruction.h | ||
XMLDocument.cpp | ||
XMLDocument.h | ||
XMLStylesheetProcessingInstruction.cpp | ||
XMLStylesheetProcessingInstruction.h | ||
htmlmathml-f.ent | ||
moz.build | ||
nsIXMLContentSink.h | ||
nsXMLContentSink.cpp | ||
nsXMLContentSink.h | ||
nsXMLElement.cpp | ||
nsXMLElement.h | ||
nsXMLFragmentContentSink.cpp | ||
nsXMLPrettyPrinter.cpp | ||
nsXMLPrettyPrinter.h |