Closed Bug 455227 Opened 16 years ago Closed 16 years ago

Add a |removeEventListener()| to browser-test.js

Categories

(Testing :: Mochitest, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9

People

(Reporter: sgautherie, Assigned: sgautherie)

References

()

Details

Attachments

(1 file, 2 obsolete files)

Even if this "leak" causes no harm (?), I don't understand the need for such code. I think this should be either fixed or documented.
Attached patch (Av1) Use |removeEventListener()|, ++ (obsolete) (deleted) — Splinter Review
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080912014358 Minefield/3.1b1pre] (home, optim default) (W2Ksp4) *Use |removeEventListener()|. Unrelated: *Merge superfluous |var ww|.
Assignee: nobody → sgautherie.bz
Attachment #338531 - Flags: review?(gavin.sharp)
Attachment #338531 - Flags: review?(gavin.sharp)
(In reply to comment #0) > Even if this "leak" causes no harm (?), I don't understand the need for such > code. Now, I understand. (broke at least some BrowserChrome > docshell tests) But I still think it would be good to add a |removeEventListener()|.
Summary: Why does browser-test.js use a custom pref instead of |removeEventListener()| ? → Add a |removeEventListener()| to browser-test.js
Right, browser-test.js is overlaid onto each window, so just removing the event listener isn't going to avoid this problem. It probably doesn't hurt to do it anyways, though.
Summary: Add a |removeEventListener()| to browser-test.js → Why does browser-test.js use a custom pref instead of |removeEventListener()| ?
Attached patch (Av1a) <browser-test.js> (obsolete) (deleted) — Splinter Review
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080912014358 Minefield/3.1b1pre] (home, optim default) (W2Ksp4) *Add |removeEventListener()|. Unrelated: *Merge superfluous |var ww|.
Attachment #338531 - Attachment is obsolete: true
Attachment #338558 - Flags: review?(gavin.sharp)
(In reply to comment #3) > just removing the event listener isn't going to avoid this problem. Agreed: cleaner/safer only ;-)
Summary: Why does browser-test.js use a custom pref instead of |removeEventListener()| ? → Add a |removeEventListener()| to browser-test.js
Comment on attachment 338558 [details] [diff] [review] (Av1a) <browser-test.js> please don't mess with the "ww" variable either. There's nothing wrong with the code as it is now - I would even argue that it's more readable - and touching unrelated code like this a) makes the patch harder to review and b) increases the risk that the patch will break something.
Attachment #338558 - Flags: review?(gavin.sharp) → review-
Av1a, with comment 6 suggestion(s).
Attachment #338558 - Attachment is obsolete: true
Attachment #338564 - Flags: review?(gavin.sharp)
Attachment #338564 - Flags: review?(gavin.sharp) → review+
Attachment #338564 - Attachment description: (Av1b) <browser-test.js> → (Av1b) <browser-test.js> [Checkin: Comment 8]
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Component: Testing → BrowserTest
Product: Core → Testing
QA Contact: testing → browsertest
Target Milestone: mozilla1.9.1b1 → mozilla1.9
Component: BrowserTest → Mochitest
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: