#include <stack_trace.h>
Definition at line 17 of file stack_trace.h.
◆ CollectFrames()
void dart::StackTraceUtils::CollectFrames |
( |
Thread * |
thread, |
|
|
int |
skip_frames, |
|
|
const std::function< void(const Frame &)> & |
handle_frame, |
|
|
bool * |
has_async_catch_error = nullptr |
|
) |
| |
|
static |
Collects all frames on the current stack until an async/async* frame is hit which has yielded before (i.e. is not in sync-async case).
From there on finds the closure of the async/async* frame and starts traversing the listeners.
Definition at line 745 of file stack_trace.cc.
749 {
750 AsyncAwareStackUnwinder it(thread, has_async_catch_error);
751 it.Unwind(skip_frames, handle_frame);
752}
◆ GetSuspendState()
bool dart::StackTraceUtils::GetSuspendState |
( |
const Closure & |
closure, |
|
|
Object * |
suspend_state |
|
) |
| |
|
static |
Definition at line 754 of file stack_trace.cc.
755 {
756 if (TryGetAwaiterLink(
closure, suspend_state)) {
757 return suspend_state->IsSuspendState();
758 }
759 return false;
760}
std::function< void()> closure
◆ IsNeededForAsyncAwareUnwinding()
bool dart::StackTraceUtils::IsNeededForAsyncAwareUnwinding |
( |
const Function & |
function | ) |
|
|
static |
Definition at line 730 of file stack_trace.cc.
730 {
731
732
734 return true;
735 }
736
738 MethodRecognizer::kFutureListenerHandleValue) {
739 return true;
740 }
741
742 return false;
743}
Dart_NativeFunction function
◆ IsPossibleAwaiterLink()
bool dart::StackTraceUtils::IsPossibleAwaiterLink |
( |
const Class & |
cls | ) |
|
|
static |
Definition at line 711 of file stack_trace.cc.
711 {
713 return false;
714 }
715
717 const auto is_class = [&](
const String&
name) {
720 };
721
722 return is_class(Symbols::_AsyncStarStreamController()) ||
723 is_class(Symbols::_SyncStreamController()) ||
724 is_class(Symbols::_StreamController()) ||
725 is_class(Symbols::_Completer()) ||
726 is_class(Symbols::_AsyncCompleter()) ||
727 is_class(Symbols::_SyncCompleter()) || is_class(Symbols::_Future());
728}
static LibraryPtr AsyncLibrary()
static bool EqualsIgnoringPrivateKey(const String &str1, const String &str2)
const char *const class_name
◆ kFutureListenerPcOffset
constexpr uword dart::StackTraceUtils::kFutureListenerPcOffset = 1 |
|
staticconstexpr |
The documentation for this class was generated from the following files: