Bug 1703692 - Use ChildOffset to build the offset path for flushes, r=nika
We can't rely on the Children list since it may have been cleared on shutdown. Since we don't clear parent edges, walking the parent chain and using mChildOffset works. Differential Revision: https://phabricator.services.mozilla.com/D118384
This commit is contained in:
@@ -3266,6 +3266,17 @@ void BrowsingContext::AddDeprioritizedLoadRunner(nsIRunnable* aRunner) {
|
||||
EventQueuePriority::Idle);
|
||||
}
|
||||
|
||||
bool BrowsingContext::GetOffsetPath(nsTArray<uint32_t>& aPath) const {
|
||||
for (const BrowsingContext* current = this; current && current->GetParent();
|
||||
current = current->GetParent()) {
|
||||
if (current->CreatedDynamically()) {
|
||||
return false;
|
||||
}
|
||||
aPath.AppendElement(current->ChildOffset());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void BrowsingContext::GetHistoryID(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aVal,
|
||||
ErrorResult& aError) {
|
||||
|
||||
Reference in New Issue
Block a user