зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1885598: Assert on a passed remoteTypeOverride to avoid footguns r=nika
Differential Revision: https://phabricator.services.mozilla.com/D204791
This commit is contained in:
Родитель
1cb477fd69
Коммит
b8555f5d7d
|
@ -901,6 +901,14 @@ void nsDocShellLoadState::SetFileName(const nsAString& aFileName) {
|
|||
mFileName = aFileName;
|
||||
}
|
||||
|
||||
void nsDocShellLoadState::SetRemoteTypeOverride(
|
||||
const nsCString& aRemoteTypeOverride) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
NS_IsAboutBlank(mURI),
|
||||
"Should only have aRemoteTypeOverride for about:blank URIs");
|
||||
mRemoteTypeOverride = mozilla::Some(aRemoteTypeOverride);
|
||||
}
|
||||
|
||||
const nsCString& nsDocShellLoadState::GetEffectiveTriggeringRemoteType() const {
|
||||
// Consider non-errorpage loads from session history as being triggred by the
|
||||
// parent process, as we'll validate them against the history entry.
|
||||
|
|
|
@ -323,9 +323,7 @@ class nsDocShellLoadState final {
|
|||
return mRemoteTypeOverride;
|
||||
}
|
||||
|
||||
void SetRemoteTypeOverride(const nsCString& aRemoteTypeOverride) {
|
||||
mRemoteTypeOverride = mozilla::Some(aRemoteTypeOverride);
|
||||
}
|
||||
void SetRemoteTypeOverride(const nsCString& aRemoteTypeOverride);
|
||||
|
||||
void SetWasSchemelessInput(bool aWasSchemelessInput) {
|
||||
mWasSchemelessInput = aWasSchemelessInput;
|
||||
|
|
Загрузка…
Ссылка в новой задаче