Last Comment Bug 720981 - Remove element.iQEventData when it's empty
: Remove element.iQEventData when it's empty
Status: RESOLVED FIXED
:
Product: Firefox Graveyard
Classification: Graveyard
Component: Panorama (show other bugs)
: Trunk
: All All
: -- normal
: Firefox 12
Assigned To: Dão Gottwald [:dao]
:
Mentors:
Depends on:
Blocks: 720985
  Show dependency treegraph
 
Reported: 2012-01-25 04:11 PST by Dão Gottwald [:dao]
Modified: 2016-04-12 14:00 PDT (History)
1 user (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (1.48 KB, patch)
2012-01-25 04:11 PST, Dão Gottwald [:dao]
ttaubert: review+
Details | Diff | Review

Description Dão Gottwald [:dao] 2012-01-25 04:11:43 PST
Created attachment 591409 [details] [diff] [review]
patch

For bug 658738, I'm investigating if we can treat it as a failure if tests leak global variables, i.e. add new properties on the window object. One of the few remaining unexpected failures is this:

TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/tabview/test/browser_tabview_bug580412.js | leaked window property: iQEventData

This is from one of these event listeners:
http://mxr.mozilla.org/mozilla-central/search?string=iQ%28gWindow%29
Comment 1 Tim Taubert [:ttaubert] 2012-01-25 04:24:39 PST
Comment on attachment 591409 [details] [diff] [review]
patch

Review of attachment 591409 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, we totally should clean up after ourselves here.

::: browser/components/tabview/iq.js
@@ +775,2 @@
>            this.unbind(type, elem.iQEventData[type][0].original);
> +      }.bind(this));

Nit: I think it's better to use forEach's second parameter instead of .bind() here.
Comment 3 Ed Morley [:emorley] 2012-01-25 18:09:03 PST
https://hg.mozilla.org/mozilla-central/rev/6e8de9819b23

Note You need to log in before you can comment on or make changes to this bug.