Bug 1742438 - Prep Part 10: Make TriggeringPrincipal optional for ScriptFetchOptions; r=jonco

I didn't realize that this would only be used in the DOM script loader, so this is now optional. In
a later stage we might move this over to the ScriptLoadContext as it looks like this might need to
propogate through the module script tree.

Differential Revision: https://phabricator.services.mozilla.com/D146172
This commit is contained in:
Yulia Startsev
2022-07-14 17:07:24 +00:00
parent 80d116b0fd
commit cca38a8cd6
2 changed files with 9 additions and 8 deletions

View File

@@ -43,9 +43,7 @@ ScriptFetchOptions::ScriptFetchOptions(
: mCORSMode(aCORSMode),
mReferrerPolicy(aReferrerPolicy),
mTriggeringPrincipal(aTriggeringPrincipal),
mElement(aElement) {
MOZ_ASSERT(mTriggeringPrincipal);
}
mElement(aElement) {}
ScriptFetchOptions::~ScriptFetchOptions() = default;