Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Display the graph created by cycle collector.
JavaScript
branch: master

Merge pull request #8 from mihaisucan/master

the simple wrapper for mochitests from mihaisucan/master
latest commit 1d9e74d8c0
@janodvarko authored
Failed to load latest commit information.
content Merge branch 'master' of git://github.com/janodvarko/ccdump
skin/classic
.gitignore updat .gitignore file
README.md add simple wrapper for ccdump that can be used from mochitests. also …
app.properties [ccdump-0.4.3]
bootstrap.js
build.js Update loader and buld file
build.xml build script (ant)
install.rdf Fix min Firefox version
license.txt add licence file (Firebug)
package.json [ccdump-0.4.3]
simple-wrapper.js style changes as requested by Honza

README.md

CCDump

CCDump is a Firefox extension which display object graph created by cycle collector. After installation, open:

about:ccdump

More Info

  • Bug 726346 - Implement a version of nsICycleCollectorListener for devtools

Mochitests

You can use ccdump to dump the object graph into a JSON file within Mozilla's mochitests. This is useful for debugging memory leaks in tests. Once you have the JSON you can import it into the addon UI for graph inspection.

Example usage:

function call_ccdump()
{
  let scope = {};
  let ccdump_path = "file:///home/mihai/src/ccdump";
  Services.scriptloader.loadSubScript(ccdump_path + "/simple-wrapper.js", scope);
  let ccdump = new scope.ccdump_wrapper({
    global: scope,
    ccdump_path: ccdump_path,
  });
  ccdump.save("/home/mihai/ccdump-dbg-memleaks-" + Date.now(),
    function _onCcdumpSave() {
      ccdump.clear();
      ccdump = scope = null;
      executeSoon(finish);
    });
}

Instead of calling finish() in your test, invoke call_ccdump().

Something went wrong with that request. Please try again.