Closed
Bug 1599445
Opened 5 years ago
Closed 5 years ago
Investigate refactoring CCRunnerFired to make it easier to follow
Categories
(Core :: DOM: Core & HTML, task)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla72
| Tracking | Status | |
|---|---|---|
| firefox72 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file)
I find the CCRunnerFired function pretty hard to follow. Mostly this is because control doesn't move linearly between the branches of the main if-statement but jumps between them on subsequent calls. And also it can recursively call itself which is confusing in itself.
I'd like to refactor this to make it easier to follow.
| Assignee | ||
Comment 1•5 years ago
|
||
This makes the function into a state machine implemented with a switch statement and gets rid of the recursive call. This results in a little duplication of logic but hopefully it is easier to understand overall. What do you think?
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f8533b22dc9b
Refactor CCRunnerFired function by writing it as a state machine r=mccr8
Comment 3•5 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox72:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in
before you can comment on or make changes to this bug.
Description
•