зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1450874 P2 Don't save service worker time stamps if the fetch event didn't actually dispatch. r=asuth
This commit is contained in:
Родитель
96a73bdbed
Коммит
0145a9634a
|
@ -137,6 +137,12 @@ InterceptedChannelBase::SaveTimeStamps()
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// If we were not able to start the fetch event for some reason (like
|
||||
// corrupted scripts), then just do nothing here.
|
||||
if (mHandleFetchEventStart.IsNull()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIChannel> underlyingChannel;
|
||||
nsresult rv = GetChannel(getter_AddRefs(underlyingChannel));
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
|
|
|
@ -957,6 +957,12 @@ InterceptedHttpChannel::SetChannelResetEnd(mozilla::TimeStamp aTimeStamp)
|
|||
NS_IMETHODIMP
|
||||
InterceptedHttpChannel::SaveTimeStamps(void)
|
||||
{
|
||||
// If we were not able to start the fetch event for some reason (like
|
||||
// corrupted scripts), then just do nothing here.
|
||||
if (mHandleFetchEventStart.IsNull()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool isNonSubresourceRequest = nsContentUtils::IsNonSubresourceRequest(this);
|
||||
nsCString navigationOrSubresource = isNonSubresourceRequest ?
|
||||
NS_LITERAL_CSTRING("navigation") : NS_LITERAL_CSTRING("subresource");
|
||||
|
|
Загрузка…
Ссылка в новой задаче