Refactor the normal loops over Timeouts inisde TimeoutManager to use ForEach helpers

RESOLVED FIXED in Firefox 53

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

unspecified
mozilla53
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
These generic loops need to run in the same way for both normal and
tracking timeouts.  This refactoring allows us to only change the
TimeoutManager ForEach helpers to loop over both linked lists when
splitting the timeouts into two separate lists without needing to
modify each call site separately.
(Assignee)

Updated

2 years ago
Assignee: nobody → ehsan
Blocks: 1312514
(Assignee)

Comment 1

2 years ago
Created attachment 8818385 [details] [diff] [review]
Refactor the normal loops over Timeouts inisde TimeoutManager to use ForEach helpers
Attachment #8818385 - Flags: review?(bkelly)
Comment on attachment 8818385 [details] [diff] [review]
Refactor the normal loops over Timeouts inisde TimeoutManager to use ForEach helpers

Review of attachment 8818385 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/base/TimeoutManager.h
@@ +89,5 @@
>    {
> +    mTimeouts.ForEach(c);
> +  }
> +  template <class Callable>
> +  void ForEachTimeoutAbortable(Callable c)

Can you add a comment documenting that the Callable should return true to abort the loop?
Attachment #8818385 - Flags: review?(bkelly) → review+

Comment 3

2 years ago
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4d62ef0ed85e
Refactor the normal loops over Timeouts inisde TimeoutManager to use ForEach helpers; r=bkelly

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4d62ef0ed85e
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.