Namespace goog.testing.stacktrace

code »

Classes

goog.testing.stacktrace.Frame
Class representing one stack frame.
Show:

Global Functions

Converts an array of CallSite (elements of a stack trace in V8) to an array of Frames.

Parameters
stack: !Array
The stack as an array of CallSites.
Returns
The stack as an array of Frames.

Brings the stack trace into a common format across browsers.

Parameters
stack: string
Browser-specific stack trace.
Returns
Same stack trace in common format.

Function to deobfuscate function names.

Creates a stack trace by following the call chain. Based on goog.debug.getStacktrace.

Returns
Stack frames.

Converts the stack frames into canonical format. Chops the beginning and the end of it which come from the testing environment, not from the test itself.

Parameters
frames: !Array.<goog.testing.stacktrace.Frame>
The frames.
Returns
Canonical, pretty printed stack trace.

Gets the native stack trace if available otherwise follows the call chain.

Returns
The stack trace in canonical format.

Returns the native stack trace.

Escapes the special character in HTML.

Parameters
text: string
Plain text.
Returns
Escaped text.

Deobfuscates a compiled function name with the function passed to #setDeobfuscateFunctionName. Returns the original function name if the deobfuscator hasn't been set.

Parameters
name: string
The function name to deobfuscate.
Returns
The deobfuscated function name.

Parses a long firefox stack frame.

Parameters
frameStr: string
The stack frame as string.
Returns
Stack frame object.

Parses one stack frame.

Parameters
frameStr: string
The stack frame as string.
Returns
Stack frame object or null if the parsing failed.

Parses the browser's native stack trace.

Parameters
stack: string
Stack trace.
Returns
Stack frames. The unrecognized frames will be nulled out.

Sets function to deobfuscate function names.

Parameters
fn: function(string): string
function to deobfuscate function names.

Global Properties

RegExp pattern for an URL + line number + column number in V8. The URL is either in submatch 1 or submatch 2.

RegExp pattern for function call in the Firefox stack trace. Creates 2 submatches with function name (optional) and arguments.

Regular expression for parsing one stack frame in Firefox.

Regular expression for finding the function name in its source.

RegExp pattern for JavaScript identifiers. We don't support Unicode identifiers defined in ECMAScript v3.

RegExp pattern for function call in a IE stack trace. This expression allows for identifiers like 'Anonymous function', 'eval code', and 'Global code'.

Regular expression for parsing a stack frame in IE.

Maximum number of steps while the call chain is followed.

Maximum length of a string that can be matched with a RegExp on Firefox 3x. Exceeding this approximate length will cause string.match to exceed Firefox's stack quota. This situation can be encountered when goog.globalEval is invoked with a long argument; such as when loading a module.

RegExp pattern for an anonymous function call in an Opera stack frame. Creates 2 (optional) submatches: the context object and function name.

RegExp pattern for a function call in an Opera stack frame. Creates 4 (optional) submatches: the function name (if not anonymous), the aliased context object and function name (if anonymous), and the function call arguments.

Regular expression for parsing on stack frame in Opera 11.68 - 12.17. Newer versions of Opera use V8 and stack frames should match against goog.testing.stacktrace.V8_STACK_FRAME_REGEXP_.

RegExp pattern for an URL + position inside the file.

RegExp pattern for function name alias in the V8 stack trace.

RegExp pattern for the context of a function call in a V8 stack trace. Creates an optional submatch for the namespace identifier including the "new" keyword for constructor calls (e.g. "new foo.Bar").

RegExp pattern for function call in the V8 stack trace. Creates 3 submatches with context object (optional), function name and function alias (optional).

RegExp pattern for function names and constructor calls in the V8 stack trace.

Regular expression for parsing one stack frame in V8. For more information on V8 stack frame formats, see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi.