Leak Monitor Extension

Summary

This Firefox extension detects one very specific type of leak in chrome JavaScript and in Web pages. (Not in JavaScript components, though.) It detects when JavaScript objects in the chrome or Web page are still held by native code after the window is closed.

Some of these leaks are things that are clearly bugs in the extension (such as registering observers with the observer service forever) and some are things that arguably shouldn't leak (at varying argument strengths). The things that are exposed to Web pages are definitely things that shouldn't leak, and most of those bugs are close to being fixed. However, a bunch of those bugs are present in Firefox 1.5 and easy for extension authors to work around (call removeEventListener to match addEventListener for functions added as event listeners).

If you see alerts when leaving Web pages, there's definitely a bug in Mozilla that should be filed; however, to avoid filing duplicates, it's probably best to test in a build that has all of these bugs fixed (which is true of 1.8 (not 1.8.0!) branch nightlies starting with 2006-06-15 and (except for the last bug, which is unlikely to be triggered since it's a brand new feature on the trunk) trunk nightlies starting with 2006-05-26):

Get the extension

Passing test cases

These are some things I test when testing the extension.

Feedback I've heard

Further Reading


Valid HTML 4.0!

(Back to Mozilla Stuff, David Baron)

LDB, dbaron@dbaron.org, 2006-05-01