gecko-dev/modules/libpref
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
..
docs Bug 1632279 - Disallow default pref definitions in user pref files. r=KrisWright 2020-04-29 21:47:12 +00:00
init Bug 1601179 - Enable async stacks but limit captured async stacks to debuggees. r=jorendorff,smaug 2020-06-14 02:41:45 +00:00
parser Bug 1632279 - Disallow default pref definitions in user pref files. r=KrisWright 2020-04-29 21:47:12 +00:00
test Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi 2020-05-05 17:41:36 +00:00
components.conf
greprefs.js
moz.build Bug 1642344 - convert converter.html2txt.always_include_ruby into a StaticPref. r=KrisWright 2020-06-09 14:45:38 +00:00
nsIPrefBranch.idl
nsIPrefLocalizedString.idl
nsIPrefService.idl
nsIRelativeFilePref.idl
nsRelativeFilePref.h
Preferences.cpp Bug 1641438 - Ensure gHashTable is only accessed on the appropriate threads. r=KrisWright 2020-06-01 04:15:44 +00:00
Preferences.h
SharedPrefMap.cpp Bug 1641438 - Remove Pref::mDefaultChanged. r=KrisWright 2020-06-01 04:15:22 +00:00
SharedPrefMap.h Bug 1641438 - Remove Pref::mDefaultChanged. r=KrisWright 2020-06-01 04:15:22 +00:00
StaticPrefsBase.h Bug 1625138 - Part 35: Replace mozilla::TrueType with std::true_type. r=froydnj,jgilbert 2020-03-28 13:57:20 +00:00