Bug 1694727, remove the testing only code for history.length handling, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D108034
This commit is contained in:
@@ -3143,35 +3143,6 @@ bool BrowsingContext::CanSet(FieldIndex<IDX_PendingInitialization>,
|
||||
return IsTop() && GetPendingInitialization() && !aNewValue;
|
||||
}
|
||||
|
||||
void BrowsingContext::SessionHistoryChanged(int32_t aIndexDelta,
|
||||
int32_t aLengthDelta) {
|
||||
if (XRE_IsParentProcess() || mozilla::SessionHistoryInParent()) {
|
||||
// This method is used to test index and length for the session history
|
||||
// in child process only.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsTop()) {
|
||||
// Some tests have unexpected setup while Fission shistory is being
|
||||
// implemented.
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<ChildSHistory> shistory = GetChildSessionHistory();
|
||||
if (!shistory || !shistory->AsyncHistoryLength()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsID changeID = shistory->AddPendingHistoryChange(aIndexDelta, aLengthDelta);
|
||||
uint32_t index = shistory->Index();
|
||||
uint32_t length = shistory->Count();
|
||||
|
||||
// Do artificial history update through parent process to test asynchronous
|
||||
// history.length handling.
|
||||
ContentChild::GetSingleton()->SendSessionHistoryUpdate(this, index, length,
|
||||
changeID);
|
||||
}
|
||||
|
||||
bool BrowsingContext::IsPopupAllowed() {
|
||||
for (auto* context = GetCurrentWindowContext(); context;
|
||||
context = context->GetParentWindowContext()) {
|
||||
|
||||
Reference in New Issue
Block a user