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):
This updates to be compatible with betas of 1.9.1 and early 1.9.2 alphas. It fixes a crash dealing with dense arrays and perhaps some Java objects from the enumeration fixes in 0.4.2.
This version fixes a common hang in 0.4.1. It also enumerates the properties of JS objects in a less intrusive way.
It is marked as compatible with all Gecko toolkit applications.
It adds Greek, Dutch, and Catalan localizations.
This version restructures the way JS object information is stored by leak-monitor so that leak-monitor doesn't alert about leaks caused by its own keeping JS objects alive. It is compatible with Gecko 1.9 (with cycle collector) and no longer compatible with Gecko 1.8.
It also adds Hungarian localization.
This adds three significant changes. First, it walks up the prototype chain to get all relevant properties, which can help figure out what an object is. Second, it considers all roots in the scope rather than just wrapped JS. And third, it works on the trunk as of 2007-09-04. But it has some issues on the trunk, and seems to cause branch builds not to start up for some reason.
It also adds Ukrainian localization.
This version fixes a binary compatibility problem in the Linux binary component.
This version fixes bug 358661 so that the alerts work again in 2.0 and trunk, adds Czech, Japanese, Spanish, and Italian localizations, and notes compatibility with Flock.
This version adds German and French localizations, cleans up the code used to add reclaimed leak alerts, and makes a few tweaks to the build system.
This version adds x86_64 Linux support, updates the Russian localization, and has build instructions and scripts in the source archive.
This version fixes a major bug with 0.3.1 (Reclaimed Leak Alerts would reappear constantly).
This version may fix additional false positives. However, more importantly, it will alert (Reclaimed Leak Alert) if any of the memory it previously reported as leaked has been reclaimed. So if you don't see the Reclaimed Leak Alert almost immediately, then it's probably a real problem. (Note that you may see the Reclaimed Leak Alert print to stdout during shutdown; it prints to the console instead of alerting during the quit process. If this happens, then it's definitely a real leak -- and one of the harder types to track down, since it's not actually still present at shutdown.)
This version fixes some alerts that were false positives (were not really leaks).
This version contains some crash fixes and adds the ability to copy the entire leak report to the clipboard. It also contains a Russian localization contributed by stoneflash.
This version also claims Thunderbird compatibility.
These are some things I test when testing the extension.
(Back to Mozilla Stuff, David Baron)
LDB, dbaron@dbaron.org, 2006-05-01