mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1220681 P5 Don't double suspend parent channel during synthesized divert to parent. r=jdm
This commit is contained in:
parent
31d9e6df91
commit
18582bdb34
@ -1438,11 +1438,21 @@ HttpChannelParent::SuspendForDiversion()
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// Try suspending the channel. Allow it to fail, since OnStopRequest may have
|
||||
// been called and thus the channel may not be pending.
|
||||
nsresult rv = mChannel->Suspend();
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv) || rv == NS_ERROR_NOT_AVAILABLE);
|
||||
mSuspendedForDiversion = NS_SUCCEEDED(rv);
|
||||
// been called and thus the channel may not be pending. If we've already
|
||||
// automatically suspended after synthesizing the response, then we don't
|
||||
// need to suspend again here.
|
||||
if (!mSuspendAfterSynthesizeResponse) {
|
||||
rv = mChannel->Suspend();
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv) || rv == NS_ERROR_NOT_AVAILABLE);
|
||||
mSuspendedForDiversion = NS_SUCCEEDED(rv);
|
||||
} else {
|
||||
// Take ownership of the automatic suspend that occurred after synthesizing
|
||||
// the response.
|
||||
mSuspendedForDiversion = true;
|
||||
}
|
||||
|
||||
rv = mParentListener->SuspendForDiversion();
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
|
Loading…
Reference in New Issue
Block a user