Index: runtime/lib/stacktrace.cc |
diff --git a/runtime/lib/stacktrace.cc b/runtime/lib/stacktrace.cc |
index a47bdb5be2567cb546d8ba4b86f189000aa0f720..48b87d4c50d5402a8ac8f4bc8d19b80cbab7eac6 100644 |
--- a/runtime/lib/stacktrace.cc |
+++ b/runtime/lib/stacktrace.cc |
@@ -111,13 +111,13 @@ DEFINE_NATIVE_ENTRY(StackTrace_current, 0) { |
DEFINE_NATIVE_ENTRY(StackTrace_asyncStackTraceHelper, 1) { |
- if (!FLAG_causal_async_stacks) return Object::null(); |
- |
GET_NATIVE_ARGUMENT(Closure, async_op, arguments->NativeArgAt(0)); |
- if (FLAG_support_debugger) { |
- Debugger* debugger = isolate->debugger(); |
- if (debugger != NULL) { |
- debugger->MaybeAsyncStepInto(async_op); |
+ if (!async_op.IsNull()) { |
+ if (FLAG_support_debugger) { |
+ Debugger* debugger = isolate->debugger(); |
+ if (debugger != NULL) { |
+ debugger->MaybeAsyncStepInto(async_op); |
+ } |
} |
} |
return CurrentStackTrace(thread, true); |