commit 30f36a59be1eb0f34d192b54702dede739b75ba3
parent 9a22a74f5ee691e94faa4b8dc03e4fd92bfee4c3
Author: Tooru Fujisawa <arai_a@mac.com>
Date: Wed, 22 Oct 2025 01:30:12 +0000
Bug 1991734 - Part 2: Remove unused PendingFetchingError state. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D267096
Diffstat:
4 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/js/loader/ModuleLoadRequest.cpp b/js/loader/ModuleLoadRequest.cpp
@@ -97,7 +97,7 @@ void ModuleLoadRequest::ModuleLoaded() {
return;
}
- MOZ_ASSERT(IsFetching() || IsPendingFetchingError());
+ MOZ_ASSERT(IsFetching());
mModuleScript = mLoader->GetFetchedModule(ModuleMapKey(mURI, mModuleType));
}
@@ -112,7 +112,7 @@ void ModuleLoadRequest::LoadFailed() {
return;
}
- MOZ_ASSERT(IsFetching() || IsPendingFetchingError());
+ MOZ_ASSERT(IsFetching());
MOZ_ASSERT(!mModuleScript);
Cancel();
diff --git a/js/loader/ModuleLoaderBase.cpp b/js/loader/ModuleLoaderBase.cpp
@@ -538,7 +538,7 @@ nsresult ModuleLoaderBase::RestartModuleLoad(ModuleLoadRequest* aRequest) {
nsresult ModuleLoaderBase::StartOrRestartModuleLoad(ModuleLoadRequest* aRequest,
RestartRequest aRestart) {
MOZ_ASSERT(aRequest->mLoader == this);
- MOZ_ASSERT(aRequest->IsFetching() || aRequest->IsPendingFetchingError());
+ MOZ_ASSERT(aRequest->IsFetching());
// NOTE: The LoadedScript::mDataType field used by the IsStencil call can be
// modified asynchronously after the StartFetch call.
@@ -628,7 +628,7 @@ void ModuleLoaderBase::SetModuleFetchStarted(ModuleLoadRequest* aRequest) {
ModuleMapKey moduleMapKey(aRequest->mURI, aRequest->mModuleType);
- MOZ_ASSERT(aRequest->IsFetching() || aRequest->IsPendingFetchingError());
+ MOZ_ASSERT(aRequest->IsFetching());
MOZ_ASSERT(!ModuleMapContainsURL(moduleMapKey));
RefPtr<LoadingRequest> loadingRequest = new LoadingRequest();
diff --git a/js/loader/ScriptLoadRequest.cpp b/js/loader/ScriptLoadRequest.cpp
@@ -238,11 +238,6 @@ void ScriptLoadRequest::NoCacheEntryFound() {
mState = State::Fetching;
}
-void ScriptLoadRequest::SetPendingFetchingError() {
- MOZ_ASSERT(IsCheckingCache());
- mState = State::PendingFetchingError;
-}
-
static bool IsInternalURIScheme(nsIURI* uri) {
return uri->SchemeIs("moz-extension") || uri->SchemeIs("resource") ||
uri->SchemeIs("moz-src") || uri->SchemeIs("chrome");
diff --git a/js/loader/ScriptLoadRequest.h b/js/loader/ScriptLoadRequest.h
@@ -128,7 +128,6 @@ class ScriptLoadRequest : public nsISupports,
enum class State : uint8_t {
CheckingCache,
- PendingFetchingError,
Fetching,
Compiling,
Ready,
@@ -147,10 +146,6 @@ class ScriptLoadRequest : public nsISupports,
bool IsCompiling() const { return mState == State::Compiling; }
bool IsCanceled() const { return mState == State::Canceled; }
- bool IsPendingFetchingError() const {
- return mState == State::PendingFetchingError;
- }
-
// Return whether the request has been completed, either successfully or
// otherwise.
bool IsFinished() const {
@@ -184,8 +179,6 @@ class ScriptLoadRequest : public nsISupports,
// constructing this ScriptLoadRequest.
void NoCacheEntryFound();
- void SetPendingFetchingError();
-
bool PassedConditionForDiskCache() const {
return mDiskCachingPlan == CachingPlan::PassedCondition;
}