From:  Nick Fitzgerald <>
Date:  05 Nov 2015 03:24:20 Hong Kong Time

Re: New heap snapshots tool in the developer tools


​On Wed, Nov 4, 2015 at 11:07 AM, David Rajchenbach-Teller <> wrote:
That sounds very useful.

Any chance we can get the same kind of output on the console in case of
mochitest memory leak?

​You can use `[ThreadSafe]Chrome​Utils.saveHeapSnapshot`[0] to programmatically save a heap snapshot file. This tool is using that under the covers right now, but we don't yet expose importing and exporting these files in the UI. It is pretty high priority to add soon.

So yes, we could definitely programmatically save a heap snapshot file at the end of a mochitest if we detect a leak. A tiny bit more work needed on the tool's frontend to import a saved snapshot.

​[0] ​