зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1877242 - Use a FunctionRef in CanonicalBrowsingContext::CallOnAllTopDescendants. r=nika
This should be marginally more efficient, in theory, so do it drive-by. Differential Revision: https://phabricator.services.mozilla.com/D199902
This commit is contained in:
Родитель
cce5bdd802
Коммит
f26fefccfa
|
@ -818,8 +818,7 @@ RefPtr<PrintPromise> CanonicalBrowsingContext::Print(
|
|||
}
|
||||
|
||||
void CanonicalBrowsingContext::CallOnAllTopDescendants(
|
||||
const std::function<mozilla::CallState(CanonicalBrowsingContext*)>&
|
||||
aCallback) {
|
||||
const FunctionRef<CallState(CanonicalBrowsingContext*)>& aCallback) {
|
||||
MOZ_ASSERT(IsChrome(), "Should only call in chrome BC");
|
||||
MOZ_ASSERT(!GetParentCrossChromeBoundary(),
|
||||
"Should only call on top chrome BC");
|
||||
|
|
|
@ -140,11 +140,9 @@ class CanonicalBrowsingContext final : public BrowsingContext {
|
|||
ErrorResult&);
|
||||
|
||||
// Call the given callback on all top-level descendant BrowsingContexts.
|
||||
// Return Callstate::Stop from the callback to stop calling
|
||||
// further children.
|
||||
// Return Callstate::Stop from the callback to stop calling further children.
|
||||
void CallOnAllTopDescendants(
|
||||
const std::function<mozilla::CallState(CanonicalBrowsingContext*)>&
|
||||
aCallback);
|
||||
const FunctionRef<CallState(CanonicalBrowsingContext*)>& aCallback);
|
||||
|
||||
void SessionHistoryCommit(uint64_t aLoadId, const nsID& aChangeID,
|
||||
uint32_t aLoadType, bool aPersist,
|
||||
|
|
Загрузка…
Ссылка в новой задаче