Skip to content

Instantly share code, notes, and snippets.

@juliandescottes
Created September 8, 2016 12:42
Show Gist options
  • Save juliandescottes/fd75b86b22b2370a1663c3f95eec1188 to your computer and use it in GitHub Desktop.
Save juliandescottes/fd75b86b22b2370a1663c3f95eec1188 to your computer and use it in GitHub Desktop.
Some tips / tricks collected from IRC/whatever
# ochameau's getWeakReference trick
let ref = require("chrome").Cu.getWeakReference(toolbox);
require("sdk/timers").setInterval(function () {
dump(" toolbox alive? "+ref.get()+"\n");
}, 2000);
# most of the time we leak the toolbox and target objects. but
# that doesn't necessary leak any window. the leak reporter only
# cares about documents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment