Requests JS stack traces in Netmonitor sometimes show chrome:// stack frames. This is confusing for users - they should only see the JS code from the page content. The chrome:// frames should be shown only in browser toolbox. Two examples of this behavior: 1) When the page is reloaded, the main document request shows stack trace from the browser calling into webNav.reload at chrome://browser/content/tab-content.js:73 2) When issuing a request from the console (i.e., type "fetch('x')"), the request stack trace contains frames like: WCA_evalWithDebugger resource://devtools/server/actors/webconsole.js:1299
One way how to implement this: when calling "components.stack", it eventually calls GetFirstSubsumedFrame at , which filters the frames by the current JSContext's principal. When called from network-monitor.js (at ), it's the system principal. It would help if we could somehow pass the content principal there instead. Nick, do you have any advice?  https://dxr.mozilla.org/mozilla-central/source/js/src/vm/SavedStacks.cpp#556  https://dxr.mozilla.org/mozilla-central/source/devtools/shared/webconsole/network-monitor.js#220
https://github.com/fitzgen/gecko-dev/blob/master/js/src/doc/SavedFrame/SavedFrame.md has the documentation you're looking for. Basically, Cu.waiveXrays(stack) will give you the content's view of the stack.
You need to log in before you can comment on or make changes to this bug.