mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1408990 - Only add the entry to the performance object if the loading document's principal is the same as the triggering principal. r=bz, r=dragana
MozReview-Commit-ID: 7o8XKHioP1p
This commit is contained in:
parent
210e82ed33
commit
3680a69516
@ -4132,6 +4132,14 @@ 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;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowInner> innerWindow = loadingDocument->GetInnerWindow();
|
||||
if (!innerWindow) {
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user