Backed out changeset b246c998fb8f (bug 1786571) for causing ScriptLoader failures CLOSED TREE
This commit is contained in:
@@ -391,10 +391,10 @@ WorkerScriptLoader::WorkerScriptLoader(
|
||||
: mOriginStack(std::move(aOriginStack)),
|
||||
mSyncLoopTarget(aSyncLoopTarget),
|
||||
mWorkerScriptType(aWorkerScriptType),
|
||||
mCancelMainThread(Nothing()),
|
||||
mRv(aRv),
|
||||
mCleanedUp(false),
|
||||
mCleanUpLock("cleanUpLock"),
|
||||
mCancelMainThread(Nothing()) {
|
||||
mCleanUpLock("cleanUpLock") {
|
||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||
MOZ_ASSERT(aSyncLoopTarget);
|
||||
|
||||
@@ -656,9 +656,6 @@ nsresult WorkerScriptLoader::OnStreamComplete(ScriptLoadRequest* aRequest,
|
||||
nsresult aStatus) {
|
||||
AssertIsOnMainThread();
|
||||
|
||||
// We expect our callers to runtime-check this in advance.
|
||||
MOZ_ASSERT(!IsCancelled());
|
||||
|
||||
LoadingFinished(aRequest, aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -711,9 +708,7 @@ nsresult WorkerScriptLoader::LoadScripts(
|
||||
nsresult rv = LoadScript(loadContext->mRequest);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
LoadingFinished(loadContext->mRequest, rv);
|
||||
// Let any error to be handled as if it was a fetch error when it
|
||||
// comes time to evaluate its script from its load having completed,
|
||||
// that is: do not CancelMainThread already here.
|
||||
CancelMainThread(rv, &aContextList);
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user