mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Do not report resource-timing subdocument loads triggered by that subdocument.
This commit is contained in:
parent
a959f4717e
commit
27d88fc505
13 changed files with 108 additions and 12 deletions
|
|
@ -3676,14 +3676,17 @@ HttpBaseChannel::GetPerformance()
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
// We only add to the document's performance object if it has the same
|
||||
// principal as the one triggering the load. This is to prevent navigations
|
||||
// triggered _by_ the iframe from showing up in the parent document's
|
||||
// performance entries if they have different origins.
|
||||
if (!mLoadInfo->TriggeringPrincipal()->Equals(loadingDocument->NodePrincipal())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (mLoadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_SUBDOCUMENT &&
|
||||
!mLoadInfo->GetIsFromProcessingFrameAttributes()) {
|
||||
// We only report loads caused by processing the attributes of the
|
||||
// browsing context container.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowInner> innerWindow = loadingDocument->GetInnerWindow();
|
||||
if (!innerWindow) {
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue