зеркало из 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,9 +62,13 @@ class ScopedRequestSuspender {
|
|||
public:
|
||||
ScopedRequestSuspender(nsIRequest *request)
|
||||
: mRequest(request) {
|
||||
mRequest->Suspend();
|
||||
if (NS_FAILED(mRequest->Suspend())) {
|
||||
NS_WARNING("Couldn't suspend pump");
|
||||
mRequest = nsnull;
|
||||
}
|
||||
}
|
||||
~ScopedRequestSuspender() {
|
||||
if (mRequest)
|
||||
mRequest->Resume();
|
||||
}
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче