Bug 1168208 - Refactor the existing logic for syncing the security info between Response and channel objects into a new helper class; r=nsm,jdm,bkelly

This commit is contained in:
Ehsan Akhgari
2015-05-25 14:21:05 -04:00
parent 070caf25e5
commit f770eb78bf
22 changed files with 327 additions and 140 deletions

View File

@@ -706,12 +706,8 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest,
}
response->SetBody(pipeInputStream);
nsCOMPtr<nsISupports> securityInfo;
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
rv = channel->GetSecurityInfo(getter_AddRefs(securityInfo));
if (securityInfo) {
response->SetSecurityInfo(securityInfo);
}
response->InitChannelInfo(channel);
// Resolves fetch() promise which may trigger code running in a worker. Make
// sure the Response is fully initialized before calling this.