tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit a0c5761e78def509afb4e9866aa4b2f76967806a
parent bf9cf5a1b0bc95e4a7521c1935a1038ba305ef69
Author: Alexandre Poirot <poirot.alex@gmail.com>
Date:   Tue,  6 Jan 2026 15:39:47 +0000

Bug 1990493 - [devtools] Show out of memory stack from server exceptions. r=devtools-reviewers,nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D277899

Diffstat:
Mdevtools/shared/protocol/Actor.js | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/devtools/shared/protocol/Actor.js b/devtools/shared/protocol/Actor.js @@ -140,8 +140,15 @@ class Actor extends Pool { fileName: error.fileName || error.filename, lineNumber: error.lineNumber, columnNumber: error.columnNumber, - // Also pass the whole stack as string - stack: error.stack, + // Also pass the whole stack as string. + // + // "out of memory" string may be thrown by SpiderMonkey, + // in which case getLastOOMStackTrace can return a last resort stack as a string. + // https://searchfox.org/firefox-main/rev/33bba5cfe4a89dda0ee07fa9fbac578353713fd3/js/src/vm/JSContext.cpp#296-297 + stack: + error == "out of memory" + ? ChromeUtils.getLastOOMStackTrace() + : error.stack, }); }