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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user