asyncCausalFrames property

  1. @optional
List<Frame>? asyncCausalFrames
getter/setter pair

A list of frames which contains both synchronous part and the asynchronous continuation e.g. async functions awaiting completion of the currently running async function. Asynchronous frames are separated from each other and synchronous prefix via frames of kind FrameKind.kAsyncSuspensionMarker.

The name is historic and misleading: despite what causal implies, this stack does not reflect the stack at the moment when asynchronous operation was started (i.e. the stack that caused it), but instead reflects the chain of listeners which will run when asynchronous operation is completed (i.e. its awaiters).

This field is absent if currently running code does not have an asynchronous continuation.

Implementation

@optional
List<Frame>? asyncCausalFrames;