Name Description Size
commands.js When given a string that begins with `:` and a unix style string, format a JS like object. This is intended to be used by the WebConsole actor only. @param String string A string to format that begins with `:`. @returns String formatted as `command({ ..args })` 7246
content-process-forward.js The message manager has an upper limit on message sizes that it can reliably forward to the parent so we limit the size of console log event messages that we forward here. The web console is local and receives the full console message, but addons subscribed to console event messages in the parent receive the truncated version. Due to fragmentation, messages as small as 1MB have resulted in IPC allocation failures on 32-bit platforms. To limit IPC allocation sizes, console.log messages with arguments with total size > MSG_MGR_CONSOLE_MAX_SIZE (bytes) have their arguments completely truncated. MSG_MGR_CONSOLE_VAR_SIZE is an approximation of how much space (in bytes) a JS non-string variable will require in the manager's implementation. For strings, we use 2 bytes per char. The console message URI and function name are limited to MSG_MGR_CONSOLE_INFO_MAX characters. We don't attempt to calculate the exact amount of space the message manager implementation will require for a given message so this is imperfect. 5193
eager-ecma-allowlist.js global BigInt 3643
eager-function-allowlist.js 1938
eval-with-debugger.js Evaluates a string using the debugger API. To allow the variables view to update properties from the Web Console we provide the "selectedObjectActor" mechanism: the Web Console tells the ObjectActor ID for which it desires to evaluate an expression. The Debugger.Object pointed at by the actor ID is bound such that it is available during expression evaluation (executeInGlobalWithBindings()). Example: _self['foobar'] = 'test' where |_self| refers to the desired object. The |frameActor| property allows the Web Console client to provide the frame actor ID, such that the expression can be evaluated in the user-selected stack frame. For the above to work we need the debugger and the Web Console to share a connection, otherwise the Web Console actor will not find the frame actor. The Debugger.Frame comes from the jsdebugger's Debugger instance, which is different from the Web Console's Debugger instance. This means that for evaluation to work, we need to create a new instance for the Web Console Commands helpers - they need to be Debugger.Objects coming from the jsdebugger's Debugger instance. When |selectedObjectActor| is used objects can come from different iframes, from different domains. To avoid permission-related errors when objects come from a different window, we also determine the object's own global, such that evaluation happens in the context of that global. This means that evaluation will happen in the object's iframe, rather than the top level window. @param string string String to evaluate. @param object [options] Options for evaluation: - selectedObjectActor: the ObjectActor ID to use for evaluation. |evalWithBindings()| will be called with one additional binding: |_self| which will point to the Debugger.Object of the given ObjectActor. Executes with the top level window as the global. - frameActor: the FrameActor ID to use for evaluation. The given debugger frame is used for evaluation, instead of the global window. - selectedNodeActor: the NodeActor ID of the currently selected node in the Inspector (or null, if there is no selection). This is used for helper functions that make reference to the currently selected node, like $0. - innerWindowID: An optional window id to use instead of webConsole.evalWindow. This is used by function that need to evaluate in a different window for which we don't have a dedicated target (for example a non-remote iframe). - eager: Set to true if you want the evaluation to bail if it may have side effects. - url: the url to evaluate the script as. Defaults to "debugger eval code", or "debugger eager eval code" if eager is true. @return object An object that holds the following properties: - dbg: the debugger where the string was evaluated. - frame: (optional) the frame where the string was evaluated. - global: the Debugger.Object for the global where the string was evaluated in. - result: the result of the evaluation. - helperResult: any result coming from a Web Console commands function. 19627
listeners 7
message-manager-mock.js Implements a fake MessageManager class that allows to use the message manager API within the same process. This implementation will forward messages within the same process. It helps having the same codepath for actors being evaluated in the same process *and* in a remote one. 1996
moz.build 625
utils.js Given a message, return one of CONSOLE_WORKER_IDS if it matches one of those. @return string 18834
webidl-deprecated-list.js 1655
webidl-pure-allowlist.js 2237
worker-listeners.js global setConsoleEventHandler, retrieveConsoleEvents 1054