Name Description Size
allocation-tracker.js This file helps tracking Javascript object allocations. It is only included in local builds as a debugging helper. It is typicaly used when running DevTools tests (either mochitests or DAMP). To use it, you need to set the following environment variable: DEBUG_DEVTOOLS_ALLOCATIONS="normal" This will only print the number of JS objects created during your test. DEBUG_DEVTOOLS_ALLOCATIONS="verbose" This will print the allocation sites of all the JS objects created during your test. i.e. from which files and lines the objects have been created. In both cases, look for "DEVTOOLS ALLOCATION" in your terminal to see tracker's output. But you can also import it from your test script if you want to focus on one particular piece of code: const { allocationTracker } = require("devtools/shared/test-helpers/allocation-tracker"); // Calling `allocationTracker` will immediately start recording allocations let tracker = allocationTracker(); // Do something // If you want to log all the allocation sites, call this method: tracker.logAllocationLog(); // Or, if you want to only print the number of objects being allocated, call this: tracker.logCount(); // Once you are done, stop the tracker as it slow down execution a lot. tracker.stop(); 22277
browser.ini 444
browser_allocation_tracker.js Any copyright is dedicated to the Public Domain. 7454 432
test_javascript_tracer.js Any copyright is dedicated to the Public Domain. 1964
thread-helpers.sys.mjs Helper code to play with the javascript thread 4337
tracked-objects.sys.mjs Request to track why the given object is kept in memory, later on, when retrieving all the watched object via getAllNodeIds. 1549
xpcshell.ini 111