mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Merge mozilla-central to autoland. a=merge CLOSED TREE
This commit is contained in:
commit
b3ff16cd7b
@ -741,7 +741,7 @@ imgRequest::OnStopRequest(nsIRequest* aRequest, nsresult status) {
|
||||
newPartPending = mNewPartPending;
|
||||
}
|
||||
if (isMultipart && newPartPending) {
|
||||
Unused << OnDataAvailable(aRequest, nullptr, 0, 0);
|
||||
OnDataAvailable(aRequest, nullptr, 0, 0);
|
||||
}
|
||||
|
||||
// Get this after OnDataAvailable because that might have created the image.
|
||||
|
@ -32,7 +32,7 @@ interface nsIStreamListener : nsIRequestObserver
|
||||
* An exception thrown from onDataAvailable has the side-effect of
|
||||
* causing the request to be canceled.
|
||||
*/
|
||||
[must_use] void onDataAvailable(in nsIRequest aRequest,
|
||||
void onDataAvailable(in nsIRequest aRequest,
|
||||
in nsIInputStream aInputStream,
|
||||
in unsigned long long aOffset,
|
||||
in unsigned long aCount);
|
||||
|
@ -810,8 +810,6 @@ void HttpChannelChild::DoOnDataAvailable(nsIRequest* aRequest,
|
||||
LOG(("HttpChannelChild::DoOnDataAvailable [this=%p]\n", this));
|
||||
if (mCanceled) return;
|
||||
|
||||
mGotDataAvailable = true;
|
||||
|
||||
if (mListener) {
|
||||
nsCOMPtr<nsIStreamListener> listener(mListener);
|
||||
nsresult rv = listener->OnDataAvailable(aRequest, aStream, aOffset, aCount);
|
||||
@ -3057,15 +3055,7 @@ HttpChannelChild::RetargetDeliveryTo(nsISerialEventTarget* aNewTarget) {
|
||||
MOZ_ASSERT(mOnDataAvailableStartTime.IsNull());
|
||||
{
|
||||
MutexAutoLock lock(mEventTargetMutex);
|
||||
// Don't assert if the target hasn't changed, or if we haven't gotten
|
||||
// OnDataAvailable
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mODATarget || (mODATarget == aNewTarget) ||
|
||||
!mGotDataAvailable);
|
||||
if (!mODATarget || (mODATarget == aNewTarget) || !mGotDataAvailable) {
|
||||
RetargetDeliveryToImpl(aNewTarget, lock);
|
||||
} else {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
RetargetDeliveryToImpl(aNewTarget, lock);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -317,7 +317,6 @@ class HttpChannelChild final : public PHttpChannelChild,
|
||||
|
||||
// Target thread for delivering ODA.
|
||||
nsCOMPtr<nsISerialEventTarget> mODATarget MOZ_GUARDED_BY(mEventTargetMutex);
|
||||
Atomic<bool, mozilla::Relaxed> mGotDataAvailable{false};
|
||||
// Used to ensure atomicity of mNeckoTarget / mODATarget;
|
||||
Mutex mEventTargetMutex{"HttpChannelChild::EventTargetMutex"};
|
||||
|
||||
|
@ -662,7 +662,7 @@ void OpaqueResponseBlocker::ResolveAndProcessData(
|
||||
// When this line reaches, the state is either State::Allowed or
|
||||
// State::Blocked. The OnDataAvailable call will either call
|
||||
// the next listener or reject the request.
|
||||
Unused << OnDataAvailable(aChannel, input, 0, mem.Size<char>());
|
||||
OnDataAvailable(aChannel, input, 0, mem.Size<char>());
|
||||
|
||||
MaybeRunOnStopRequest(aChannel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user