Bug 1322966 - Cleanup performance.cpp

https://hg.mozilla.org/mozilla-central/rev/0ad76084c4c3
This commit is contained in:
janekptacijarabaci 2018-04-29 12:07:20 +02:00 committed by Roy Tam
commit dbccb9748a
6 changed files with 9 additions and 47 deletions

View file

@ -3124,8 +3124,7 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
newInnerWindow->mPerformance =
Performance::CreateForMainThread(newInnerWindow->AsInner(),
currentInner->mPerformance->GetDOMTiming(),
currentInner->mPerformance->GetChannel(),
currentInner->mPerformance->GetParentPerformance());
currentInner->mPerformance->GetChannel());
}
}
@ -4339,22 +4338,7 @@ nsPIDOMWindowInner::CreatePerformanceObjectIfNeeded()
timedChannel = nullptr;
}
if (timing) {
// If we are dealing with an iframe, we will need the parent's performance
// object (so we can add the iframe as a resource of that page).
Performance* parentPerformance = nullptr;
nsCOMPtr<nsPIDOMWindowOuter> parentWindow = GetScriptableParentOrNull();
if (parentWindow) {
nsPIDOMWindowInner* parentInnerWindow = nullptr;
if (parentWindow) {
parentInnerWindow = parentWindow->GetCurrentInnerWindow();
}
if (parentInnerWindow) {
parentPerformance = parentInnerWindow->GetPerformance();
}
}
mPerformance =
Performance::CreateForMainThread(this, timing, timedChannel,
parentPerformance);
mPerformance = Performance::CreateForMainThread(this, timing, timedChannel);
}
}