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

RESOLVED FIXED in Firefox 53

Status

()

defect
RESOLVED FIXED
3 years ago
4 months ago

People

(Reporter: Ehsan, Assigned: Ehsan)

Tracking

unspecified
mozilla53
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

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: nobody → ehsan
Blocks: 1312514
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+
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
https://hg.mozilla.org/mozilla-central/rev/4d62ef0ed85e
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.