|
@@ -116,10 +116,8 @@ JS::GCPtr<NavigationHistoryEntry> Navigation::current_entry() const
|
|
if (has_entries_and_events_disabled())
|
|
if (has_entries_and_events_disabled())
|
|
return nullptr;
|
|
return nullptr;
|
|
|
|
|
|
- // FIXME 2. Assert: navigation's current entry index is not −1.
|
|
|
|
- // FIXME: This should not happen once Navigable's algorithms properly set up NHEs.
|
|
|
|
- if (m_current_entry_index == -1)
|
|
|
|
- return nullptr;
|
|
|
|
|
|
+ // 2. Assert: navigation's current entry index is not −1.
|
|
|
|
+ VERIFY(m_current_entry_index != -1);
|
|
|
|
|
|
// 3. Return navigation's entry list[navigation's current entry index].
|
|
// 3. Return navigation's entry list[navigation's current entry index].
|
|
return m_entry_list[m_current_entry_index];
|
|
return m_entry_list[m_current_entry_index];
|
|
@@ -162,10 +160,8 @@ bool Navigation::can_go_back() const
|
|
if (has_entries_and_events_disabled())
|
|
if (has_entries_and_events_disabled())
|
|
return false;
|
|
return false;
|
|
|
|
|
|
- // FIXME 2. Assert: navigation's current entry index is not −1.
|
|
|
|
- // FIXME: This should not happen once Navigable's algorithms properly set up NHEs.
|
|
|
|
- if (m_current_entry_index == -1)
|
|
|
|
- return false;
|
|
|
|
|
|
+ // 2. Assert: navigation's current entry index is not −1.
|
|
|
|
+ VERIFY(m_current_entry_index != -1);
|
|
|
|
|
|
// 3. If this's current entry index is 0, then return false.
|
|
// 3. If this's current entry index is 0, then return false.
|
|
// 4. Return true.
|
|
// 4. Return true.
|
|
@@ -181,10 +177,8 @@ bool Navigation::can_go_forward() const
|
|
if (has_entries_and_events_disabled())
|
|
if (has_entries_and_events_disabled())
|
|
return false;
|
|
return false;
|
|
|
|
|
|
- // FIXME 2. Assert: navigation's current entry index is not −1.
|
|
|
|
- // FIXME: This should not happen once Navigable's algorithms properly set up NHEs.
|
|
|
|
- if (m_current_entry_index == -1)
|
|
|
|
- return false;
|
|
|
|
|
|
+ // 2. Assert: navigation's current entry index is not −1.
|
|
|
|
+ VERIFY(m_current_entry_index != -1);
|
|
|
|
|
|
// 3. If this's current entry index is equal to this's entry list's size, then return false.
|
|
// 3. If this's current entry index is equal to this's entry list's size, then return false.
|
|
// 4. Return true.
|
|
// 4. Return true.
|