Closed Bug 1323326 Opened 7 years ago Closed 7 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

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: 7 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.

Attachment

General

Created:
Updated:
Size: