gecko-dev/devtools/shared/protocol
Logan Smyth 25d491b792 Bug 1601179 - Enable async stacks but limit captured async stacks to debuggees. r=jorendorff,smaug
The 'asyncStack' flag on JS execution contexts is used as a general switch
to enable async stack capture across all locations in SpiderMonkey, but
this causes problems because it can at times be too much of a performance
burden to general and track all of these stacks.

Since the introduction of this option, we have only enabled it on Nightly
and DevEdition for non-mobile builds, which has left a lot of users unable
to take advantage of this data while debugging.

This patch enables async stack traces across all of Firefox, but introduces
a new pref to toggle the scope of the actual expensive part of async stacks,
which is _capturing_ them and keeping them alive in memory. The new pref
limits the capturing of async stack traces to only debuggees, unless an
explicit pref is flipped to capture async traces for all cases.

This means that while async stacks are technically enabled, and code could
manually capture a stack and pass it back to SpiderMonkey and see that stack
reflected in later captured stacks, SpiderMonkey itself and related async
DOM APIs, among others, will not capture stacks or pass them to SpiderMonkey,
so there should be no general change in performance by enabling the broader
feature itself, unless the user is actively debugging the page.

One effect of this patch is that if you have the debugger open and then close
it, objects that have async stacks associated with them will retain those
stacks and they will continue to show up in stack traces, no _new_ stacks
will be captured. jorendorff and I have decided that this is okay because
the expectation that the debugger fully revert every possible effect that it
could have on a page is a nice goal but not a strict requirement.

Differential Revision: https://phabricator.services.mozilla.com/D68503
2020-06-14 02:41:45 +00:00
..
Actor Bug 1596686 - Use absolute paths for require calls r=gl 2019-12-27 12:23:47 +00:00
Front Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers 2020-03-08 21:45:16 +00:00
tests/xpcshell Bug 1601179 - Enable async stacks but limit captured async stacks to debuggees. r=jorendorff,smaug 2020-06-14 02:41:45 +00:00
Actor.js Bug 1639111 - Show the filename, line and column for DevTools actor errors r=davidwalsh,ochameau 2020-05-25 17:13:59 +00:00
Front.js Bug 1639111 - Show the filename, line and column for DevTools actor errors r=davidwalsh,ochameau 2020-05-25 17:13:59 +00:00
Pool.js Bug 1622116 - Add a helper for visualizing server pools. r=ochameau 2020-04-08 17:33:12 +00:00
Request.js Bug 1596686 - Use absolute paths for require calls r=gl 2019-12-27 12:23:47 +00:00
Response.js Bug 1596686 - Use absolute paths for require calls r=gl 2019-12-27 12:23:47 +00:00
lazy-pool.js Bug 1620194 - Remove actor-registry actor r=ochameau 2020-03-18 09:29:45 +00:00
moz.build Bug 1609128 - Move all protocol.js tests next to its implementation. r=jdescottes 2020-01-16 16:46:53 +00:00
types.js Bug 1622005 - Make RootFront more protocol.js-y .r=ochameau. 2020-03-16 17:29:25 +00:00
utils.js Bug 1562583 - Add license headers in devtools/shared/protocol files r=jlast 2019-07-03 18:00:30 +00:00