Closed Bug 1848004 Opened 1 year ago Closed 10 months ago

Refactor event type code in XMLHttpRequest code

Categories

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

task

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: twisniewski, Assigned: twisniewski)

References

Details

Attachments

(1 file)

We can improve the way we handle passing around and identifying readystatechange and progress events in the XMLHttpRequest classes to reduce technical debt.

  1. Factor out the enums and string constants into the base XMLHttpRequest class.
  2. Add a few helper methods to make it easier to compare, loop through, and get the string representation of an event type.
  3. Use stronger typing on a couple of methods to ensure they only get the types of events they expect.

This will also make the final code a bit more readable and easier to alter in bugs like bug 1842970, as well as making it trivial to print actual event names rather than enum integers in our debug logs.

Severity: -- → N/A
Type: defect → task
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Blocks: 1842970
No longer blocks: xhr
Pushed by twisniewski@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b49c04cee5d Refactor event type code in XMLHttpRequest code; r=sunil,necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
Regressions: 1880826
Regressions: 1880836
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: