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.logAllocationSites(); // 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(); 7970
browser.ini 119
browser_allocation_tracker.js Any copyright is dedicated to the Public Domain. 2279
.eslintrc.js 149