зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1021221 - resourceTiming initiatorType is empty/other when images are loaded from cache r=seth
Setting the initiatorType to img in ProxyListener::OnStartRequest for resources that don't already have it set.
This commit is contained in:
Родитель
1b7e164233
Коммит
47907c06e3
|
@ -2431,6 +2431,16 @@ NS_IMETHODIMP ProxyListener::OnStartRequest(nsIRequest *aRequest, nsISupports *c
|
|||
|
||||
nsCOMPtr<nsIChannel> channel(do_QueryInterface(aRequest));
|
||||
if (channel) {
|
||||
// We need to set the initiator type for the image load
|
||||
nsCOMPtr<nsITimedChannel> timedChannel = do_QueryInterface(channel);
|
||||
if (timedChannel) {
|
||||
nsAutoString type;
|
||||
timedChannel->GetInitiatorType(type);
|
||||
if (type.IsEmpty()) {
|
||||
timedChannel->SetInitiatorType(NS_LITERAL_STRING("img"));
|
||||
}
|
||||
}
|
||||
|
||||
nsAutoCString contentType;
|
||||
nsresult rv = channel->GetContentType(contentType);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче