зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1858083. Avoid needless addref in Document::GetBrowsingContext. r=smaug
It's a weak pointer but presumably can only die based on main thread actions. The GetBrowsingContext getter is just a plain getter, returning a pointer. Although small this does show up in the profile in bug 1857094. It's called from some common layout/painting functions. Differential Revision: https://phabricator.services.mozilla.com/D190559
This commit is contained in:
Родитель
8dd124f851
Коммит
7addcf497b
|
@ -16696,8 +16696,8 @@ void Document::SetUserHasInteracted() {
|
|||
}
|
||||
|
||||
BrowsingContext* Document::GetBrowsingContext() const {
|
||||
nsCOMPtr<nsIDocShell> docshell(mDocumentContainer);
|
||||
return docshell ? docshell->GetBrowsingContext() : nullptr;
|
||||
return mDocumentContainer ? mDocumentContainer->GetBrowsingContext()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
void Document::NotifyUserGestureActivation() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче