зеркало из https://github.com/mozilla/pjs.git
Bug 343599 only call Resume if Suspend succeeded
r+sr=darin
This commit is contained in:
Родитель
07ecca07e1
Коммит
5ee454e55b
|
@ -62,10 +62,14 @@ class ScopedRequestSuspender {
|
|||
public:
|
||||
ScopedRequestSuspender(nsIRequest *request)
|
||||
: mRequest(request) {
|
||||
mRequest->Suspend();
|
||||
if (NS_FAILED(mRequest->Suspend())) {
|
||||
NS_WARNING("Couldn't suspend pump");
|
||||
mRequest = nsnull;
|
||||
}
|
||||
}
|
||||
~ScopedRequestSuspender() {
|
||||
mRequest->Resume();
|
||||
if (mRequest)
|
||||
mRequest->Resume();
|
||||
}
|
||||
private:
|
||||
nsIRequest *mRequest;
|
||||
|
|
Загрузка…
Ссылка в новой задаче