Backed out 2 changesets (bug 1280629) for wpt failures on media-elements/video_008.htm

Backed out changeset 64648fd6ef5e (bug 1280629)
Backed out changeset e654f2b128f6 (bug 1280629)
This commit is contained in:
Narcis Beleuzu 2018-08-15 19:44:37 +03:00
Родитель a8cee6550b
Коммит 2c112fd0ac
12 изменённых файлов: 0 добавлений и 155 удалений

Просмотреть файл

@ -1816,10 +1816,6 @@ pref("network.http.rcwn.max_wait_before_racing_ms", 500);
// all available active connections.
pref("network.http.focused_window_transaction_ratio", "0.9");
// This is the size of the flow control window (KB) (i.e., the amount of data
// that the parent can send to the child before getting an ack)
pref("network.http.send_window_size", 1024);
// Whether or not we give more priority to active tab.
// Note that this requires restart for changes to take effect.
#ifdef ANDROID

Просмотреть файл

@ -920,50 +920,6 @@ HttpChannelChild::OnTransportAndData(const nsresult& channelStatus,
DoOnDataAvailable(this, mListenerContext, stringStream, offset, count);
stringStream->Close();
if (NeedToReportBytesRead()) {
mUnreportBytesRead += count;
if (mUnreportBytesRead >= gHttpHandler->SendWindowSize() >> 2) {
if (NS_IsMainThread()) {
Unused << SendBytesRead(mUnreportBytesRead);
} else {
// PHttpChannel connects to the main thread
RefPtr<HttpChannelChild> self = this;
int32_t bytesRead = mUnreportBytesRead;
nsCOMPtr<nsIEventTarget> neckoTarget = GetNeckoTarget();
MOZ_ASSERT(neckoTarget);
DebugOnly<nsresult> rv = neckoTarget->Dispatch(
NS_NewRunnableFunction("net::HttpChannelChild::SendBytesRead",
[self, bytesRead]() {
Unused << self->SendBytesRead(bytesRead);
}),
NS_DISPATCH_NORMAL);
MOZ_ASSERT(NS_SUCCEEDED(rv));
}
mUnreportBytesRead = 0;
}
}
}
bool
HttpChannelChild::NeedToReportBytesRead() {
if (mCacheNeedToReportBytesReadInitialized) {
return mNeedToReportBytesRead;
}
// Might notify parent for partial cache, and the IPC message is ignored by
// parent.
int64_t contentLength = -1;
if (gHttpHandler->SendWindowSize() == 0 ||
mIsFromCache ||
NS_FAILED(GetContentLength(&contentLength)) ||
contentLength < gHttpHandler->SendWindowSize()) {
mNeedToReportBytesRead = false;
}
mCacheNeedToReportBytesReadInitialized = true;
return mNeedToReportBytesRead;
}
void

Просмотреть файл

@ -258,12 +258,6 @@ private:
const nsCString& aProvider,
const nsCString& aFullHash);
// Return true if we need to tell the parent the size of unreported received
// data
bool NeedToReportBytesRead();
bool mCacheNeedToReportBytesReadInitialized = false;
bool mNeedToReportBytesRead = true;
int32_t mUnreportBytesRead = 0;
void DoOnStartRequest(nsIRequest* aRequest, nsISupports* aContext);
void DoOnStatus(nsIRequest* aRequest, nsresult status);

Просмотреть файл

@ -73,7 +73,6 @@ HttpChannelParent::HttpChannelParent(const PBrowserOrId& iframeEmbedding,
, mIgnoreProgress(false)
, mSentRedirect1BeginFailed(false)
, mReceivedRedirect2Verify(false)
, mHasSuspendedByBackPressure(false)
, mPendingDiversion(false)
, mDivertingFromChild(false)
, mDivertedOnStartRequest(false)
@ -96,8 +95,6 @@ HttpChannelParent::HttpChannelParent(const PBrowserOrId& iframeEmbedding,
mNestedFrameId = iframeEmbedding.get_TabId();
}
mSendWindowSize = gHttpHandler->SendWindowSize();
mEventQ = new ChannelEventQueue(static_cast<nsIParentRedirectingChannel*>(this));
}
@ -1586,10 +1583,6 @@ HttpChannelParent::OnStopRequest(nsIRequest *aRequest,
return NS_ERROR_UNEXPECTED;
}
if (NeedFlowControl()) {
Telemetry::Accumulate(Telemetry::NETWORK_BACK_PRESSURE_SUSPENSION_RATE, mHasSuspendedByBackPressure);
}
return NS_OK;
}
@ -1629,8 +1622,6 @@ HttpChannelParent::OnDataAvailable(nsIRequest *aRequest,
return NS_ERROR_OUT_OF_MEMORY;
}
int32_t count = static_cast<int32_t>(aCount);
while (aCount) {
nsresult rv = NS_ReadInputStreamToString(aInputStream, data, toRead);
if (NS_FAILED(rv)) {
@ -1652,66 +1643,9 @@ HttpChannelParent::OnDataAvailable(nsIRequest *aRequest,
toRead = std::min<uint32_t>(aCount, kCopyChunkSize);
}
if (NeedFlowControl()) {
// We're going to run out of sending window size
if (mSendWindowSize > 0 && mSendWindowSize <= count) {
MOZ_ASSERT(!mSuspendedForFlowControl);
Unused << mChannel->Suspend();
mSuspendedForFlowControl = true;
mHasSuspendedByBackPressure = true;
}
mSendWindowSize -= count;
}
return NS_OK;
}
bool
HttpChannelParent::NeedFlowControl()
{
if (mCacheNeedFlowControlInitialized) {
return mNeedFlowControl;
}
int64_t contentLength = -1;
RefPtr<nsHttpChannel> httpChannelImpl = do_QueryObject(mChannel);
// By design, we won't trigger the flow control if
// a. pref-out
// b. the resource is from cache or partial cache
// c. the resource is small
// Note that we served the cached resource first for partical cache, which is
// ignored here since we only take the first ODA into consideration.
if (gHttpHandler->SendWindowSize() == 0 ||
!httpChannelImpl ||
httpChannelImpl->IsReadingFromCache() ||
NS_FAILED(httpChannelImpl->GetContentLength(&contentLength)) ||
contentLength < gHttpHandler->SendWindowSize()) {
mNeedFlowControl = false;
}
mCacheNeedFlowControlInitialized = true;
return mNeedFlowControl;
}
mozilla::ipc::IPCResult
HttpChannelParent::RecvBytesRead(const int32_t& aCount)
{
if (!NeedFlowControl()) {
return IPC_OK();
}
LOG(("HttpBackgroundChannelParent::RecvBytesRead [this=%p count=%" PRId32 "]\n", this, aCount));
if (mSendWindowSize <= 0 && mSendWindowSize + aCount > 0) {
MOZ_ASSERT(mSuspendedForFlowControl);
Unused << mChannel->Resume();
mSuspendedForFlowControl = false;
}
mSendWindowSize += aCount;
return IPC_OK();
}
//-----------------------------------------------------------------------------
// HttpChannelParent::nsIProgressEventSink
//-----------------------------------------------------------------------------

Просмотреть файл

@ -209,7 +209,6 @@ protected:
virtual mozilla::ipc::IPCResult RecvDivertComplete() override;
virtual mozilla::ipc::IPCResult RecvRemoveCorsPreflightCacheEntry(const URIParams& uri,
const mozilla::ipc::PrincipalInfo& requestingPrincipal) override;
virtual mozilla::ipc::IPCResult RecvBytesRead(const int32_t& aCount) override;
virtual void ActorDestroy(ActorDestroyReason why) override;
// Supporting function for ADivertableParentChannel.
@ -263,15 +262,6 @@ private:
// DocumentChannelCleanup.
void CleanupBackgroundChannel();
// Check if the channel needs to enable the flow control on the IPC channel.
// That is, we may suspend the channel if the ODA-s to child process are not
// consumed quickly enough. Otherwise, memory explosion could happen.
bool NeedFlowControl();
bool mCacheNeedFlowControlInitialized = false;
bool mNeedFlowControl = true;
bool mSuspendedForFlowControl = false;
int32_t mSendWindowSize;
friend class HttpBackgroundChannelParent;
friend class DivertDataAvailableEvent;
friend class DivertStopRequestEvent;
@ -319,7 +309,6 @@ private:
uint8_t mSentRedirect1BeginFailed : 1;
uint8_t mReceivedRedirect2Verify : 1;
uint8_t mHasSuspendedByBackPressure : 1;
// Indicates that diversion has been requested, but we could not start it
// yet because the channel is still being opened with a synthesized response.

Просмотреть файл

@ -91,10 +91,6 @@ parent:
// sure not to send any more messages after that.
async DeletingChannel();
// Tell the parent the amount bytes read by child for the e10s back pressure
// flow control
async BytesRead(int32_t count);
async __delete__();
child:

Просмотреть файл

@ -221,7 +221,6 @@ nsHttpHandler::nsHttpHandler()
, mThrottleReadInterval(500)
, mThrottleHoldTime(600)
, mThrottleMaxTime(3000)
, mSendWindowSize(1024)
, mUrgentStartEnabled(true)
, mTailBlockingEnabled(true)
, mTailDelayQuantum(600)
@ -1746,11 +1745,6 @@ nsHttpHandler::PrefsChanged(const char *pref)
}
}
if (PREF_CHANGED(HTTP_PREF("send_window_size"))) {
Unused << Preferences::GetInt(HTTP_PREF("send_window_size"), &val);
mSendWindowSize = val >= 0 ? val : 0;
}
if (PREF_CHANGED(HTTP_PREF("on_click_priority"))) {
Unused << Preferences::GetBool(HTTP_PREF("on_click_priority"), &mUrgentStartEnabled);
}

Просмотреть файл

@ -148,7 +148,6 @@ public:
uint32_t TailBlockingTotalMax() { return mTailTotalMax; }
uint32_t ThrottlingReadLimit() { return mThrottleVersion == 1 ? 0 : mThrottleReadLimit; }
int32_t SendWindowSize() { return mSendWindowSize * 1024; }
// TCP Keepalive configuration values.
@ -503,8 +502,6 @@ private:
uint32_t mThrottleHoldTime;
uint32_t mThrottleMaxTime;
int32_t mSendWindowSize;
bool mUrgentStartEnabled;
bool mTailBlockingEnabled;
uint32_t mTailDelayQuantum;

Просмотреть файл

@ -1,5 +1,4 @@
[createImageBitmap-origin.sub.html]
prefs: [network.http.send_window_size:0]
[cross-origin HTMLImageElement]
expected: FAIL

Просмотреть файл

@ -1,3 +1,2 @@
[pause-move-to-other-document.html]
max-asserts: 103
prefs: [network.http.send_window_size:0]

Просмотреть файл

@ -1,3 +1,2 @@
[video_initially_paused.html]
expected: FAIL
prefs: [network.http.send_window_size:0]

Просмотреть файл

@ -1954,14 +1954,6 @@
"labels": ["NotSent", "CachedContentUsed", "CachedContentNotUsed"],
"description": "Stats for validation requests when cache won the race."
},
"NETWORK_BACK_PRESSURE_SUSPENSION_RATE": {
"record_in_processes": ["main"],
"expires_in_version": "68",
"alert_emails": ["necko@mozilla.com", "junior@mozilla.com"],
"bug_numbers": [1280629],
"kind": "boolean",
"description": "Collect whether the flow control to enable e10s back pressure triggers the suspension (true) or not (false)"
},
"NETWORK_HTTP_REDIRECT_TO_SCHEME" :{
"record_in_processes": ["main"],
"alert_emails": ["necko@mozilla.com", "seceng-telemetry@mozilla.com", "jkt@mozilla.com"],