Backed out changeset ec31f39d4df8 (bug 1170937) for mochitest-e10s-4 permafail CLOSED TREE

This commit is contained in:
Wes Kocher 2015-06-09 15:16:42 -07:00
parent 1743ba7608
commit 13b7b7bfbe
3 changed files with 11 additions and 20 deletions

View File

@ -548,16 +548,14 @@ FetchDriver::ContinueHttpFetchAfterNetworkFetch()
}
already_AddRefed<InternalResponse>
FetchDriver::BeginAndGetFilteredResponse(InternalResponse* aResponse, nsIURI* aFinalURI)
FetchDriver::BeginAndGetFilteredResponse(InternalResponse* aResponse)
{
MOZ_ASSERT(aResponse);
nsAutoCString reqURL;
if (aFinalURI) {
aFinalURI->GetSpec(reqURL);
} else {
if (!aResponse->FinalURL()) {
nsAutoCString reqURL;
mRequest->GetURL(reqURL);
aResponse->SetUrl(reqURL);
}
aResponse->SetUrl(reqURL);
// FIXME(nsm): Handle mixed content check, step 7 of fetch.
@ -586,7 +584,7 @@ FetchDriver::BeginAndGetFilteredResponse(InternalResponse* aResponse, nsIURI* aF
void
FetchDriver::BeginResponse(InternalResponse* aResponse)
{
nsRefPtr<InternalResponse> r = BeginAndGetFilteredResponse(aResponse, nullptr);
nsRefPtr<InternalResponse> r = BeginAndGetFilteredResponse(aResponse);
// Release the ref.
}
@ -718,17 +716,9 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest,
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
response->InitChannelInfo(channel);
nsCOMPtr<nsIURI> channelURI;
rv = channel->GetURI(getter_AddRefs(channelURI));
if (NS_WARN_IF(NS_FAILED(rv))) {
FailWithNetworkError();
// Cancel request.
return rv;
}
// Resolves fetch() promise which may trigger code running in a worker. Make
// sure the Response is fully initialized before calling this.
mResponse = BeginAndGetFilteredResponse(response, channelURI);
mResponse = BeginAndGetFilteredResponse(response);
nsCOMPtr<nsIEventTarget> sts = do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
if (NS_WARN_IF(NS_FAILED(rv))) {

View File

@ -88,9 +88,8 @@ private:
nsresult HttpFetch(bool aCORSFlag = false, bool aCORSPreflightFlag = false, bool aAuthenticationFlag = false);
nsresult ContinueHttpFetchAfterNetworkFetch();
// Returns the filtered response sent to the observer.
// Callers who don't have access to a channel can pass null for aFinalURI.
already_AddRefed<InternalResponse>
BeginAndGetFilteredResponse(InternalResponse* aResponse, nsIURI* aFinalURI);
BeginAndGetFilteredResponse(InternalResponse* aResponse);
// Utility since not all cases need to do any post processing of the filtered
// response.
void BeginResponse(InternalResponse* aResponse);

View File

@ -27,10 +27,12 @@ skip-if = buildapp == 'b2g' # Bug 1137683
skip-if = buildapp == 'b2g' # Bug 1137683
[test_fetch_basic_http.html]
[test_fetch_basic_http_sw_reroute.html]
skip-if = buildapp == 'b2g' # Bug 1137683
skip-if = true # Bug 1170937, need fully support for redirects
#skip-if = buildapp == 'b2g' # Bug 1137683
[test_fetch_cors.html]
[test_fetch_cors_sw_reroute.html]
skip-if = buildapp == 'b2g' # Bug 1137683
skip-if = true # Bug 1170937, need fully support for redirects
#skip-if = buildapp == 'b2g' # Bug 1137683
[test_formdataparsing.html]
[test_formdataparsing_sw_reroute.html]
skip-if = buildapp == 'b2g' # Bug 1137683