Closed
Bug 1334250
Opened 8 years ago
Closed 8 years ago
Avoid more removeEventListener calls when {once: true} can be used instead
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
Details
Attachments
(3 files)
11.77 KB,
text/plain
|
Details | |
8.63 KB,
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
24.81 KB,
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
The script used in bug 1331599 missed cases where the event listener was added and removed using a variable for the event name.
Assignee | ||
Comment 1•8 years ago
|
||
This includes tweaks to the eslint rule, and changes that couldn't be handled by the script due to the capture value being in a variable.
Attachment #8830892 -
Flags: review?(jaws)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → florian
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8830893 -
Flags: review?(jaws)
Updated•8 years ago
|
Attachment #8830892 -
Flags: review?(jaws) → review+
Comment 3•8 years ago
|
||
Comment on attachment 8830893 [details] [diff] [review]
script-generated patch
Review of attachment 8830893 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the below code removed and the function name removed as well since it is no longer necessary.
::: b2g/components/ContentRequestHelper.jsm
@@ +39,5 @@
> if (!msg || !msg.id || msg.id != id) {
> deferred.reject("InternalErrorWrongContentEvent " +
> JSON.stringify(msg));
> SystemAppProxy.removeEventListener(aContentEventName,
> onContentEvent);
This is duplicate/unnecessary code?
Attachment #8830893 -
Flags: review?(jaws) → review+
Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b838ee5b00577a898bf66a3958736e0727c8b796
Bug 1334250 - adapt the no-useless-removeEventListener rule to handle the listener being added and removed with the same variable + some hand fixes, r=jaws.
https://hg.mozilla.org/integration/mozilla-inbound/rev/87fde7e63c1a0a7d808e2f178191f3187057c4e7
Bug 1334250 - script-generated patch to avoid removeEventListener calls when a variable is used for the event name, r=jaws.
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b838ee5b0057
https://hg.mozilla.org/mozilla-central/rev/87fde7e63c1a
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
You need to log in
before you can comment on or make changes to this bug.
Description
•