From fea96b4527a2db6cd97c9053d647478b347d3853 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 14 Dec 2018 12:50:01 +0100 Subject: Do not report resource-timing subdocument loads triggered by that subdocument. --- ipc/glue/BackgroundUtils.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'ipc') diff --git a/ipc/glue/BackgroundUtils.cpp b/ipc/glue/BackgroundUtils.cpp index 44f988efd..6f7501f70 100644 --- a/ipc/glue/BackgroundUtils.cpp +++ b/ipc/glue/BackgroundUtils.cpp @@ -295,7 +295,8 @@ LoadInfoToLoadInfoArgs(nsILoadInfo *aLoadInfo, aLoadInfo->CorsUnsafeHeaders(), aLoadInfo->GetForcePreflight(), aLoadInfo->GetIsPreflight(), - aLoadInfo->GetLoadTriggeredFromExternal() + aLoadInfo->GetLoadTriggeredFromExternal(), + aLoadInfo->GetIsFromProcessingFrameAttributes() ); return NS_OK; @@ -347,7 +348,7 @@ LoadInfoArgsToLoadInfo(const OptionalLoadInfoArgs& aOptionalLoadInfoArgs, redirectChain.AppendElement(redirectedPrincipal.forget()); } - nsCOMPtr loadInfo = + RefPtr loadInfo = new mozilla::LoadInfo(loadingPrincipal, triggeringPrincipal, principalToInherit, @@ -375,8 +376,12 @@ LoadInfoArgsToLoadInfo(const OptionalLoadInfoArgs& aOptionalLoadInfoArgs, loadInfoArgs.loadTriggeredFromExternal() ); - loadInfo.forget(outLoadInfo); - return NS_OK; + if (loadInfoArgs.isFromProcessingFrameAttributes()) { + loadInfo->SetIsFromProcessingFrameAttributes(); + } + + loadInfo.forget(outLoadInfo); + return NS_OK; } } // namespace ipc -- cgit v1.2.3