pub unsafe extern "C" fn BuildStackString(
cx: *mut JSContext,
principals: *mut JSPrincipals,
stack: Handle<*mut JSObject>,
stringp: MutableHandle<*mut JSString>,
indent: usize,
stackFormat: StackFormat,
) -> bool
Expand description
Given a SavedFrame JSObject stack, stringify it in the same format as Error.prototype.stack. The stringified stack out parameter is placed in the cx’s compartment. Defaults to the empty string.
The same notes above about SavedFrame accessors applies here as well: cx doesn’t need to be in stack’s compartment, and stack can be null, a SavedFrame object, or a wrapper (CCW or Xray) around a SavedFrame object. SavedFrames not subsumed by |principals| are skipped.
Optional indent parameter specifies the number of white spaces to indent each line.