From d3e4c4d633eca379462dd4473b8995761155ee84 Mon Sep 17 00:00:00 2001 From: Slava Egorov Date: Tue, 4 Jul 2023 11:22:44 +0200 Subject: [PATCH] Use awaiter-link pragma to guide VM's builtin awaiter stack unwinding (#135) --- lib/src/stack_zone_specification.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/stack_zone_specification.dart b/lib/src/stack_zone_specification.dart index 8408d04..7309ce0 100644 --- a/lib/src/stack_zone_specification.dart +++ b/lib/src/stack_zone_specification.dart @@ -117,7 +117,10 @@ class StackZoneSpecification { /// Tracks the current stack chain so it can be set to [_currentNode] when /// [f] is run. ZoneUnaryCallback _registerUnaryCallback( - Zone self, ZoneDelegate parent, Zone zone, R Function(T) f) { + Zone self, + ZoneDelegate parent, + Zone zone, + @pragma('vm:awaiter-link') R Function(T) f) { if (_disabled) return parent.registerUnaryCallback(zone, f); var node = _createNode(1); return parent.registerUnaryCallback(