mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: Issue #618 - Don't mute errors for module scripts because they always use CORS (75f3f09f)
This commit is contained in:
@@ -2472,10 +2472,10 @@ ScriptLoader::PrepareLoadedRequest(ScriptLoadRequest* aRequest,
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(req);
|
||||
// If this load was subject to a CORS check; don't flag it with a
|
||||
// separate origin principal, so that it will treat our document's
|
||||
// principal as the origin principal
|
||||
if (aRequest->mCORSMode == CORS_NONE) {
|
||||
// If this load was subject to a CORS check, don't flag it with a separate
|
||||
// origin principal, so that it will treat our document's principal as the
|
||||
// origin principal. Module loads always use CORS.
|
||||
if (!aRequest->IsModuleRequest() && aRequest->mCORSMode == CORS_NONE) {
|
||||
rv = nsContentUtils::GetSecurityManager()->
|
||||
GetChannelResultPrincipal(channel, getter_AddRefs(aRequest->mOriginPrincipal));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
Reference in New Issue
Block a user