Backed out changeset 84cb594525ad (bug 1400655) for eslint failure in devtools/client/jsonview/test/browser_jsonview_serviceworker.js. r=backout

--HG--
extra : rebase_source : b47d28eed6fb93bcefb3543872816585e59759f9
This commit is contained in:
Sebastian Hengst 2017-10-26 00:24:57 +02:00
Родитель 68e0f7c499
Коммит 8e8a8276cd
5 изменённых файлов: 14 добавлений и 29 удалений

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

@ -4339,20 +4339,5 @@ HttpBaseChannel::SetLastRedirectFlags(uint32_t aValue)
return NS_OK;
}
// NOTE: This function duplicates code from nsBaseChannel. This will go away
// once HTTP uses nsBaseChannel (part of bug 312760)
/* static */ void
HttpBaseChannel::CallTypeSniffers(void *aClosure, const uint8_t *aData,
uint32_t aCount)
{
nsIChannel *chan = static_cast<nsIChannel*>(aClosure);
nsAutoCString newType;
NS_SniffContent(NS_CONTENT_SNIFFER_CATEGORY, chan, aData, aCount, newType);
if (!newType.IsEmpty()) {
chan->SetContentType(newType);
}
}
} // namespace net
} // namespace mozilla

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

@ -464,9 +464,6 @@ protected:
// Called before we create the redirect target channel.
already_AddRefed<nsILoadInfo> CloneLoadInfoForRedirect(nsIURI *newURI, uint32_t redirectFlags);
static void CallTypeSniffers(void *aClosure, const uint8_t *aData,
uint32_t aCount);
friend class PrivateBrowsingChannel<HttpBaseChannel>;
friend class InterceptFailedOnStop;

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

@ -681,12 +681,6 @@ HttpChannelChild::DoOnStartRequest(nsIRequest* aRequest, nsISupports* aContext)
Cancel(NS_ERROR_FAILURE);
return;
}
if (mSynthesizedResponsePump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) {
mSynthesizedResponsePump->PeekStream(CallTypeSniffers,
static_cast<nsIChannel*>(this));
}
nsresult rv = mListener->OnStartRequest(aRequest, aContext);
if (NS_FAILED(rv)) {
Cancel(rv);

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

@ -1001,11 +1001,6 @@ InterceptedHttpChannel::OnStartRequest(nsIRequest* aRequest,
if (!mProgressSink) {
GetCallback(mProgressSink);
}
if (mPump && mLoadFlags & LOAD_CALL_CONTENT_SNIFFERS) {
mPump->PeekStream(CallTypeSniffers, static_cast<nsIChannel*>(this));
}
if (mListener) {
mListener->OnStartRequest(this, mListenerContext);
}

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

@ -1320,6 +1320,20 @@ nsHttpChannel::SetupTransaction()
return rv;
}
// NOTE: This function duplicates code from nsBaseChannel. This will go away
// once HTTP uses nsBaseChannel (part of bug 312760)
static void
CallTypeSniffers(void *aClosure, const uint8_t *aData, uint32_t aCount)
{
nsIChannel *chan = static_cast<nsIChannel*>(aClosure);
nsAutoCString newType;
NS_SniffContent(NS_CONTENT_SNIFFER_CATEGORY, chan, aData, aCount, newType);
if (!newType.IsEmpty()) {
chan->SetContentType(newType);
}
}
// Helper Function to report messages to the console when loading
// a resource was blocked due to a MIME type mismatch.
void