зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1678774 - Rename ScriptLoadRequestList::Cancel to CancelRequestsAndClear r=dpalmeiro
It's not otherwise obvious that calling this cancels all the requests in the list. Differential Revision: https://phabricator.services.mozilla.com/D119491
This commit is contained in:
Родитель
596f5488eb
Коммит
d06022bd80
|
@ -273,9 +273,9 @@ void ScriptLoadRequest::SetIsLoadRequest(nsIScriptElement* aElement) {
|
|||
// ScriptLoadRequestList
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
ScriptLoadRequestList::~ScriptLoadRequestList() { Clear(); }
|
||||
ScriptLoadRequestList::~ScriptLoadRequestList() { CancelRequestsAndClear(); }
|
||||
|
||||
void ScriptLoadRequestList::Clear() {
|
||||
void ScriptLoadRequestList::CancelRequestsAndClear() {
|
||||
while (!isEmpty()) {
|
||||
RefPtr<ScriptLoadRequest> first = StealFirst();
|
||||
first->Cancel();
|
||||
|
|
|
@ -351,7 +351,7 @@ class ScriptLoadRequestList : private mozilla::LinkedList<ScriptLoadRequest> {
|
|||
public:
|
||||
~ScriptLoadRequestList();
|
||||
|
||||
void Clear();
|
||||
void CancelRequestsAndClear();
|
||||
|
||||
#ifdef DEBUG
|
||||
bool Contains(ScriptLoadRequest* aElem) const;
|
||||
|
|
|
@ -4307,11 +4307,11 @@ void ScriptLoader::ParsingComplete(bool aTerminated) {
|
|||
if (!aTerminated) {
|
||||
return;
|
||||
}
|
||||
mDeferRequests.Clear();
|
||||
mLoadingAsyncRequests.Clear();
|
||||
mLoadedAsyncRequests.Clear();
|
||||
mNonAsyncExternalScriptInsertedRequests.Clear();
|
||||
mXSLTRequests.Clear();
|
||||
mDeferRequests.CancelRequestsAndClear();
|
||||
mLoadingAsyncRequests.CancelRequestsAndClear();
|
||||
mLoadedAsyncRequests.CancelRequestsAndClear();
|
||||
mNonAsyncExternalScriptInsertedRequests.CancelRequestsAndClear();
|
||||
mXSLTRequests.CancelRequestsAndClear();
|
||||
|
||||
for (ScriptLoadRequest* req = mDynamicImportRequests.getFirst(); req;
|
||||
req = req->getNext()) {
|
||||
|
@ -4321,7 +4321,7 @@ void ScriptLoader::ParsingComplete(bool aTerminated) {
|
|||
// from mDynamicImportRequests.
|
||||
FinishDynamicImportAndReject(req->AsModuleRequest(), NS_ERROR_ABORT);
|
||||
}
|
||||
mDynamicImportRequests.Clear();
|
||||
mDynamicImportRequests.CancelRequestsAndClear();
|
||||
|
||||
if (mParserBlockingRequest) {
|
||||
mParserBlockingRequest->Cancel();
|
||||
|
|
Загрузка…
Ссылка в новой задаче