From d5a5a263128a58f4f0b8e12f02bffd8a955d91f5 Mon Sep 17 00:00:00 2001 From: Srujan Gaddam <58529443+srujzs@users.noreply.github.com> Date: Thu, 9 Oct 2025 09:45:02 -0700 Subject: [PATCH 1/3] [DWDS] Don't send PauseInterrupted event during a hot reload (#2695) Fixes https://github.com/dart-lang/sdk/issues/61560 We rely on a pause within a hot reload to pause execution so that we can reregister breakpoints. However, the existing pause mechanism always sends a PauseInterrupted event, which then triggers the client to think this is a normal pause event and not an internal detail. Instead, we should have the ChromeProxyService signal to the debugger that this is an "internal pause" and therefore it should not send a regular pause event and should use a completer to signal the pause is done. Tests are refactored and updated to correctly check for the events when reregistering breakpoints. Specifically, it checks no other events besides the expected ones are sent. --- dwds/CHANGELOG.md | 6 + dwds/lib/src/debugging/debugger.dart | 24 +- dwds/lib/src/injected/client.js | 704 +++++++++--------- .../src/services/chrome_proxy_service.dart | 27 +- dwds/lib/src/version.dart | 2 +- dwds/pubspec.yaml | 2 +- dwds/test/hot_reload_breakpoints_test.dart | 31 +- dwds/test/hot_restart_breakpoints_test.dart | 57 +- 8 files changed, 474 insertions(+), 379 deletions(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 7208f3e20..e1bc5c507 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,3 +1,9 @@ +## 25.1.0+1-wip + +- Bump SDK constraint to ^3.10.0 +- Added 'scriptUri' parameter to compileExpressionToJs +- Fix an issue in `reloadSources` where a `PauseInterrupted` event was sent. - [#61560](https://github.com/dart-lang/sdk/issues/61560) + ## 25.1.0 - Added `DartDevelopmentServiceConfiguration` to allow for configuring DDS behavior. diff --git a/dwds/lib/src/debugging/debugger.dart b/dwds/lib/src/debugging/debugger.dart index e68e5d315..3f6961e19 100644 --- a/dwds/lib/src/debugging/debugger.dart +++ b/dwds/lib/src/debugging/debugger.dart @@ -97,15 +97,28 @@ class Debugger extends Domain { bool _isStepping = false; DartLocation? _previousSteppingLocation; + // If not null and not completed, the pause handler completes this instead of + // sending a `PauseInterrupted` event to the event stream. + // + // In some cases e.g. a hot reload, DWDS pauses the execution itself in order + // to handle debugging logic like breakpoints. In such cases, sending the + // event to the event stream may trigger the client to believe that the user + // sent the event. To avoid that and still signal that a pause is completed, + // this completer is used. See https://github.com/dart-lang/sdk/issues/61560 + // for more details. + Completer? _internalPauseCompleter; + void updateInspector(AppInspectorInterface appInspector) { inspector = appInspector; _breakpoints.inspector = appInspector; } - Future pause() async { + Future pause({bool internalPause = false}) async { _isStepping = false; + if (internalPause) _internalPauseCompleter = Completer(); final result = await _remoteDebugger.pause(); handleErrorIfPresent(result); + await _internalPauseCompleter?.future; return Success(); } @@ -635,7 +648,14 @@ class Debugger extends Domain { // DevTools is showing an overlay. Both cannot be shown at the same time. // _showPausedOverlay(); isolate.pauseEvent = event; - _streamNotify('Debug', event); + final internalPauseCompleter = _internalPauseCompleter; + if (event.kind == EventKind.kPauseInterrupted && + internalPauseCompleter != null && + !internalPauseCompleter.isCompleted) { + internalPauseCompleter.complete(); + } else { + _streamNotify('Debug', event); + } } /// Handles resume events coming from the Chrome connection. diff --git a/dwds/lib/src/injected/client.js b/dwds/lib/src/injected/client.js index 4680e9b74..daf6c2f43 100644 --- a/dwds/lib/src/injected/client.js +++ b/dwds/lib/src/injected/client.js @@ -1,4 +1,4 @@ -// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.10.0-142.0.dev. +// Generated by dart2js (, csp, intern-composite-values), the Dart to JavaScript compiler version: 3.10.0-290.1.beta. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -640,7 +640,7 @@ for (i = left + 1, t1 = J.getInterceptor$asx(a); i <= right; ++i) { el = t1.$index(a, i); j = i; - while (true) { + for (;;) { if (j > left) { t2 = compare.call$2(t1.$index(a, j - 1), el); if (typeof t2 !== "number") @@ -764,7 +764,7 @@ } ++less; } else - for (; true;) { + for (;;) { comp = compare.call$2(t1.$index(a, great), el2); if (comp > 0) { --great; @@ -798,7 +798,7 @@ } ++less; } else if (compare.call$2(ak, el4) > 0) - for (; true;) + for (;;) if (compare.call$2(t1.$index(a, great), el4) > 0) { --great; if (great < k) @@ -831,9 +831,9 @@ if (pivots_are_equal) return; if (less < index1 && great > index5) { - for (; J.$eq$(compare.call$2(t1.$index(a, less), el2), 0);) + while (J.$eq$(compare.call$2(t1.$index(a, less), el2), 0)) ++less; - for (; J.$eq$(compare.call$2(t1.$index(a, great), el4), 0);) + while (J.$eq$(compare.call$2(t1.$index(a, great), el4), 0)) --great; for (k = less; k <= great; ++k) { ak = t1.$index(a, k); @@ -844,7 +844,7 @@ } ++less; } else if (compare.call$2(ak, el4) === 0) - for (; true;) + for (;;) if (compare.call$2(t1.$index(a, great), el4) === 0) { --great; if (great < k) @@ -2996,7 +2996,7 @@ }, _Universe_findRule(universe, targetType) { var rule = universe.tR[targetType]; - for (; typeof rule == "string";) + while (typeof rule == "string") rule = universe.tR[rule]; return rule; }, @@ -3696,7 +3696,7 @@ tNamedLength = tNamed.length; for (sIndex = 0, tIndex = 0; tIndex < tNamedLength; tIndex += 3) { tName = tNamed[tIndex]; - for (; true;) { + for (;;) { if (sIndex >= sNamedLength) return false; sName = sNamed[sIndex]; @@ -3718,7 +3718,7 @@ break; } } - for (; sIndex < sNamedLength;) { + while (sIndex < sNamedLength) { if (sNamed[sIndex + 1]) return false; sIndex += 3; @@ -3729,7 +3729,7 @@ var rule, recipes, $length, supertypeArgs, i, sName = s._primary, tName = t._primary; - for (; sName !== tName;) { + while (sName !== tName) { rule = universe.tR[sName]; if (rule == null) return false; @@ -4099,7 +4099,7 @@ _Future__propagateToListeners(source, listeners) { var t2, t3, _box_0, t4, t5, hasError, asyncError, nextListener, nextListener0, sourceResult, t6, zone, oldZone, result, current, _box_1 = {}, t1 = _box_1.source = source; - for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic; true;) { + for (t2 = type$.AsyncError, t3 = type$.nullable__FutureListener_dynamic_dynamic;;) { _box_0 = {}; t4 = t1._state; t5 = (t4 & 16) === 0; @@ -5485,7 +5485,7 @@ newEnd = end, index = newEnd, padding = 0; - while (true) { + for (;;) { if (!(index > start && padding < 2)) break; c$0: { @@ -5817,7 +5817,7 @@ _BigIntImpl__normalize(used, digits) { var t2, t1 = digits.length; - while (true) { + for (;;) { if (used > 0) { t2 = used - 1; if (!(t2 < t1)) @@ -6191,7 +6191,7 @@ while (iterator.moveNext$0()); } else { string += A.S(iterator.get$current()); - for (; iterator.moveNext$0();) + while (iterator.moveNext$0()) string = string + separator + A.S(iterator.get$current()); } return string; @@ -6377,7 +6377,7 @@ var next, ultimateString, penultimateString, penultimate, ultimate, ultimate0, elision, it = J.get$iterator$ax(iterable), $length = 0, count = 0; - while (true) { + for (;;) { if (!($length < 80 || count < 3)) break; if (!it.moveNext$0()) @@ -6416,7 +6416,7 @@ ultimate0 = it.get$current(); ++count; if (count > 100) { - while (true) { + for (;;) { if (!($length > 75 && count > 3)) break; if (0 >= parts.length) @@ -6438,7 +6438,7 @@ elision = "..."; } else elision = null; - while (true) { + for (;;) { if (!($length > 80 && parts.length > 3)) break; if (0 >= parts.length) @@ -6628,42 +6628,62 @@ A._asString(encodedComponent); return A._Uri__uriDecode(encodedComponent, 0, encodedComponent.length, B.C_Utf8Codec, false); }, - Uri__parseIPv4Address(host, start, end) { - var t1, i, partStart, partIndex, char, part, partIndex0, - _s43_ = "IPv4 address should contain exactly 4 parts", - _s37_ = "each part must be in the range 0..255", - error = new A.Uri__parseIPv4Address_error(host), - result = new Uint8Array(4); - for (t1 = host.length, i = start, partStart = i, partIndex = 0; i < end; ++i) { - if (!(i >= 0 && i < t1)) - return A.ioore(host, i); - char = host.charCodeAt(i); - if (char !== 46) { - if ((char ^ 48) > 9) - error.call$2("invalid character", i); - } else { - if (partIndex === 3) - error.call$2(_s43_, i); - part = A.int_parse(B.JSString_methods.substring$2(host, partStart, i), null); - if (part > 255) - error.call$2(_s37_, partStart); - partIndex0 = partIndex + 1; - if (!(partIndex < 4)) - return A.ioore(result, partIndex); - result[partIndex] = part; - partStart = i + 1; - partIndex = partIndex0; + Uri__ipv4FormatError(msg, source, position) { + throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, source, position)); + }, + Uri__parseIPv4Address(host, start, end, target, targetOffset) { + var t1, octetStart, cursor, octetIndex, octetValue, char, digit, octetIndex0, t2, + _s17_ = "invalid character"; + for (t1 = host.length, octetStart = start, cursor = octetStart, octetIndex = 0, octetValue = 0;;) { + if (cursor >= end) + char = 0; + else { + if (!(cursor >= 0 && cursor < t1)) + return A.ioore(host, cursor); + char = host.charCodeAt(cursor); } + digit = char ^ 48; + if (digit <= 9) { + if (octetValue !== 0 || cursor === octetStart) { + octetValue = octetValue * 10 + digit; + if (octetValue <= 255) { + ++cursor; + continue; + } + A.Uri__ipv4FormatError("each part must be in the range 0..255", host, octetStart); + } + A.Uri__ipv4FormatError("parts must not have leading zeros", host, octetStart); + } + if (cursor === octetStart) { + if (cursor === end) + break; + A.Uri__ipv4FormatError(_s17_, host, cursor); + } + octetIndex0 = octetIndex + 1; + t2 = targetOffset + octetIndex; + target.$flags & 2 && A.throwUnsupportedOperation(target); + if (!(t2 < 16)) + return A.ioore(target, t2); + target[t2] = octetValue; + if (char === 46) { + if (octetIndex0 < 4) { + ++cursor; + octetIndex = octetIndex0; + octetStart = cursor; + octetValue = 0; + continue; + } + break; + } + if (cursor === end) { + if (octetIndex0 === 4) + return; + break; + } + A.Uri__ipv4FormatError(_s17_, host, cursor); + octetIndex = octetIndex0; } - if (partIndex !== 3) - error.call$2(_s43_, end); - part = A.int_parse(B.JSString_methods.substring$2(host, partStart, end), null); - if (part > 255) - error.call$2(_s37_, partStart); - if (!(partIndex < 4)) - return A.ioore(result, partIndex); - result[partIndex] = part; - return result; + A.Uri__ipv4FormatError("IPv4 address should contain exactly 4 parts", host, cursor); }, Uri__validateIPvAddress(host, start, end) { var error; @@ -6685,7 +6705,7 @@ _s38_ = "Missing hex-digit in IPvFuture address", _s128_ = string$.x00_____; ++start; - for (t1 = host.length, cursor = start; true; cursor = cursor0) { + for (t1 = host.length, cursor = start;; cursor = cursor0) { if (cursor < end) { cursor0 = cursor + 1; if (!(cursor >= 0 && cursor < t1)) @@ -6710,7 +6730,7 @@ } if (cursor === end) return new A.FormatException("Missing address in IPvFuture address, host, cursor", null, null); - for (; true;) { + for (;;) { if (!(cursor >= 0 && cursor < t1)) return A.ioore(host, cursor); char = host.charCodeAt(cursor); @@ -6726,83 +6746,128 @@ } }, Uri_parseIPv6Address(host, start, end) { - var parts, i, partStart, wildcardSeen, seenDot, char, atEnd, last, bytes, wildCardLength, index, value, j, t2, _null = null, - error = new A.Uri_parseIPv6Address_error(host), - parseHex = new A.Uri_parseIPv6Address_parseHex(error, host), - t1 = host.length; - if (t1 < 2) - error.call$2("address is too short", _null); - parts = A._setArrayType([], type$.JSArray_int); - for (i = start, partStart = i, wildcardSeen = false, seenDot = false; i < end; ++i) { - if (!(i >= 0 && i < t1)) - return A.ioore(host, i); - char = host.charCodeAt(i); - if (char === 58) { - if (i === start) { - ++i; - if (!(i < t1)) - return A.ioore(host, i); - if (host.charCodeAt(i) !== 58) - error.call$2("invalid start colon.", i); - partStart = i; - } - if (i === partStart) { - if (wildcardSeen) - error.call$2("only one wildcard `::` is allowed", i); - B.JSArray_methods.add$1(parts, -1); - wildcardSeen = true; - } else - B.JSArray_methods.add$1(parts, parseHex.call$2(partStart, i)); - partStart = i + 1; - } else if (char === 46) - seenDot = true; - } - if (parts.length === 0) - error.call$2("too few parts", _null); - atEnd = partStart === end; - t1 = B.JSArray_methods.get$last(parts); - if (atEnd && t1 !== -1) - error.call$2("expected a part after last `:`", end); - if (!atEnd) - if (!seenDot) - B.JSArray_methods.add$1(parts, parseHex.call$2(partStart, end)); + var result, t1, wildcardAt, partCount, t2, cursor, partStart, hexValue, decValue, char, _0_0, decValue0, hexDigit, _1_0, t3, partCount0, partAfterWildcard, partsAfterWildcard, positionAfterWildcard, newPositionAfterWildcard, + _s39_ = "an address must contain at most 8 parts", + error = new A.Uri_parseIPv6Address_error(host); + if (end - start < 2) + error.call$2("address is too short", null); + result = new Uint8Array(16); + t1 = host.length; + if (!(start >= 0 && start < t1)) + return A.ioore(host, start); + wildcardAt = -1; + partCount = 0; + if (host.charCodeAt(start) === 58) { + t2 = start + 1; + if (!(t2 < t1)) + return A.ioore(host, t2); + if (host.charCodeAt(t2) === 58) { + cursor = start + 2; + partStart = cursor; + wildcardAt = 0; + partCount = 1; + } else { + error.call$2("invalid start colon", start); + cursor = start; + partStart = cursor; + } + } else { + cursor = start; + partStart = cursor; + } + for (hexValue = 0, decValue = true;;) { + if (cursor >= end) + char = 0; else { - last = A.Uri__parseIPv4Address(host, partStart, end); - B.JSArray_methods.add$1(parts, (last[0] << 8 | last[1]) >>> 0); - B.JSArray_methods.add$1(parts, (last[2] << 8 | last[3]) >>> 0); + if (!(cursor < t1)) + return A.ioore(host, cursor); + char = host.charCodeAt(cursor); } - if (wildcardSeen) { - if (parts.length > 7) - error.call$2("an address with a wildcard must have less than 7 parts", _null); - } else if (parts.length !== 8) - error.call$2("an address without a wildcard must contain exactly 8 parts", _null); - bytes = new Uint8Array(16); - for (t1 = parts.length, wildCardLength = 9 - t1, i = 0, index = 0; i < t1; ++i) { - value = parts[i]; - if (value === -1) - for (j = 0; j < wildCardLength; ++j) { - if (!(index >= 0 && index < 16)) - return A.ioore(bytes, index); - bytes[index] = 0; - t2 = index + 1; - if (!(t2 < 16)) - return A.ioore(bytes, t2); - bytes[t2] = 0; - index += 2; + $label0$0: { + _0_0 = char ^ 48; + decValue0 = false; + if (_0_0 <= 9) + hexDigit = _0_0; + else { + _1_0 = char | 32; + if (_1_0 >= 97 && _1_0 <= 102) + hexDigit = _1_0 - 87; + else + break $label0$0; + decValue = decValue0; } - else { - t2 = B.JSInt_methods._shrOtherPositive$1(value, 8); - if (!(index >= 0 && index < 16)) - return A.ioore(bytes, index); - bytes[index] = t2; - t2 = index + 1; + if (cursor < partStart + 4) { + hexValue = hexValue * 16 + hexDigit; + ++cursor; + continue; + } + error.call$2("an IPv6 part can contain a maximum of 4 hex digits", partStart); + } + if (cursor > partStart) { + if (char === 46) { + if (decValue) { + if (partCount <= 6) { + A.Uri__parseIPv4Address(host, partStart, end, result, partCount * 2); + partCount += 2; + cursor = end; + break; + } + error.call$2(_s39_, partStart); + } + break; + } + t2 = partCount * 2; + t3 = B.JSInt_methods._shrOtherPositive$1(hexValue, 8); + if (!(t2 < 16)) + return A.ioore(result, t2); + result[t2] = t3; + ++t2; if (!(t2 < 16)) - return A.ioore(bytes, t2); - bytes[t2] = value & 255; - index += 2; + return A.ioore(result, t2); + result[t2] = hexValue & 255; + ++partCount; + if (char === 58) { + if (partCount < 8) { + ++cursor; + partStart = cursor; + hexValue = 0; + decValue = true; + continue; + } + error.call$2(_s39_, cursor); + } + break; + } + if (char === 58) { + if (wildcardAt < 0) { + partCount0 = partCount + 1; + ++cursor; + wildcardAt = partCount; + partCount = partCount0; + partStart = cursor; + continue; + } + error.call$2("only one wildcard `::` is allowed", cursor); + } + if (wildcardAt !== partCount - 1) + error.call$2("missing part", cursor); + break; + } + if (cursor < end) + error.call$2("invalid character", cursor); + if (partCount < 8) { + if (wildcardAt < 0) + error.call$2("an address without a wildcard must contain exactly 8 parts", end); + partAfterWildcard = wildcardAt + 1; + partsAfterWildcard = partCount - partAfterWildcard; + if (partsAfterWildcard > 0) { + positionAfterWildcard = partAfterWildcard * 2; + newPositionAfterWildcard = 16 - partsAfterWildcard * 2; + B.NativeUint8List_methods.setRange$4(result, newPositionAfterWildcard, 16, result, positionAfterWildcard); + B.NativeUint8List_methods.fillRange$3(result, positionAfterWildcard, newPositionAfterWildcard, 0); } } - return bytes; + return result; }, _Uri$_internal(scheme, _userInfo, _host, _port, path, _query, _fragment) { return new A._Uri(scheme, _userInfo, _host, _port, path, _query, _fragment); @@ -7319,32 +7384,22 @@ for (t1 = path.split("/"), t2 = t1.length, appendSlash = false, _i = 0; _i < t2; ++_i) { segment = t1[_i]; if (".." === segment) { - appendSlash = output.length !== 0 && B.JSArray_methods.get$last(output) !== ".."; - if (appendSlash) { + if (output.length !== 0 && B.JSArray_methods.get$last(output) !== "..") { if (0 >= output.length) return A.ioore(output, -1); output.pop(); } else B.JSArray_methods.add$1(output, ".."); + appendSlash = true; } else { appendSlash = "." === segment; if (!appendSlash) - B.JSArray_methods.add$1(output, segment); + B.JSArray_methods.add$1(output, segment.length === 0 && output.length === 0 ? "./" : segment); } } - t1 = output.length; - if (t1 !== 0) - if (t1 === 1) { - if (0 >= t1) - return A.ioore(output, 0); - t1 = output[0].length === 0; - } else - t1 = false; - else - t1 = true; - if (t1) + if (output.length === 0) return "./"; - if (appendSlash || B.JSArray_methods.get$last(output) === "..") + if (appendSlash) B.JSArray_methods.add$1(output, ""); if (!allowScheme) { if (0 >= output.length) @@ -7401,7 +7456,7 @@ var simple, codeUnit, t2, bytes, t1 = text.length, i = start; - while (true) { + for (;;) { if (!(i < end)) { simple = true; break; @@ -7465,7 +7520,7 @@ } if (slashIndex < 0 && i > start) throw A.wrapException(A.FormatException$(_s17_, text, i)); - for (; char !== 44;) { + while (char !== 44) { B.JSArray_methods.add$1(indices, i); ++i; for (equalsIndex = -1; i < t1; ++i) { @@ -7647,16 +7702,9 @@ StringBuffer: function StringBuffer(t0) { this._contents = t0; }, - Uri__parseIPv4Address_error: function Uri__parseIPv4Address_error(t0) { - this.host = t0; - }, Uri_parseIPv6Address_error: function Uri_parseIPv6Address_error(t0) { this.host = t0; }, - Uri_parseIPv6Address_parseHex: function Uri_parseIPv6Address_parseHex(t0, t1) { - this.error = t0; - this.host = t1; - }, _Uri: function _Uri(t0, t1, t2, t3, t4, t5, t6) { var _ = this; _.scheme = t0; @@ -7718,6 +7766,9 @@ FutureOfVoidToJSPromise_get_toJS(_this) { return A._asJSObject(new init.G.Promise(A._functionToJS2(new A.FutureOfVoidToJSPromise_get_toJS_closure(_this)))); }, + NullRejectionException: function NullRejectionException(t0) { + this.isUndefined = t0; + }, FutureOfJSAnyToJSPromise_get_toJS_closure: function FutureOfJSAnyToJSPromise_get_toJS_closure(t0) { this._this = t0; }, @@ -7862,9 +7913,6 @@ dartify_convert: function dartify_convert(t0) { this._convertedObjects = t0; }, - NullRejectionException: function NullRejectionException(t0) { - this.isUndefined = t0; - }, max(a, b, $T) { A.checkTypeBound($T, type$.num, "T", "max"); return Math.max($T._as(a), $T._as(b)); @@ -8417,7 +8465,7 @@ QueueList__nextPowerOf2(number) { var nextNumber; number = (number << 1 >>> 0) - 1; - for (; true; number = nextNumber) { + for (;; number = nextNumber) { nextNumber = (number & number - 1) >>> 0; if (nextNumber === 0) return number; @@ -8845,7 +8893,7 @@ chunk1 = ""; chunk2 = ""; chunk3 = ""; - while (true) { + for (;;) { if (!!(d4 === 0 && d3 === 0)) break; q = B.JSInt_methods.$tdiv(d4, fatRadix); @@ -9000,7 +9048,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -9164,7 +9212,7 @@ var $async$Response_fromStream = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -9862,7 +9910,7 @@ var $async$BrowserWebSocket_connect = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10038,7 +10086,7 @@ var $async$_authenticateUser = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10078,7 +10126,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10137,7 +10185,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10216,7 +10264,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10347,7 +10395,7 @@ var $async$_Debugger_maybeInvokeFlutterDisassemble = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10375,7 +10423,7 @@ var $async$_Debugger_maybeInvokeFlutterReassemble = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10428,7 +10476,7 @@ var $async$SdkDeveloperExtension_maybeInvokeFlutterDisassemble = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10458,7 +10506,7 @@ var $async$RequireRestarter_create = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -10726,7 +10774,7 @@ findLineStart(context, text, column) { var beginningOfLine, index, lineStart; if (text.length === 0) - for (beginningOfLine = 0; true;) { + for (beginningOfLine = 0;;) { index = B.JSString_methods.indexOf$2(context, "\n", beginningOfLine); if (index === -1) return context.length - beginningOfLine >= column ? beginningOfLine : null; @@ -10735,7 +10783,7 @@ beginningOfLine = index + 1; } index = B.JSString_methods.indexOf$1(context, text); - for (; index !== -1;) { + while (index !== -1) { lineStart = index === 0 ? 0 : B.JSString_methods.lastIndexOf$2(context, "\n", index - 1) + 1; if (column === index - lineStart) return lineStart; @@ -11568,7 +11616,7 @@ return receiver; if (times !== times >>> 0) throw A.wrapException(B.C_OutOfMemoryError); - for (s = receiver, result = ""; true;) { + for (s = receiver, result = "";;) { if ((times & 1) === 1) result = s + result; times = times >>> 1; @@ -12699,7 +12747,7 @@ A._instanceType(_this)._eval$1("~(1,2)")._as(action); cell = _this._first; modifications = _this._modifications; - for (; cell != null;) { + while (cell != null) { action.call$2(cell.hashMapCellKey, cell.hashMapCellValue); if (modifications !== _this._modifications) throw A.wrapException(A.ConcurrentModificationError$(_this)); @@ -12922,7 +12970,7 @@ call$1(o) { return this.getTag(o); }, - $signature: 6 + $signature: 5 }; A.initHooks_closure0.prototype = { call$2(o, tag) { @@ -12967,7 +13015,7 @@ _fieldKeys$0() { var t1, shapeTag = this.$shape; - for (; $._Record__computedFieldKeys.length <= shapeTag;) + while ($._Record__computedFieldKeys.length <= shapeTag) B.JSArray_methods.add$1($._Record__computedFieldKeys, null); t1 = $._Record__computedFieldKeys[shapeTag]; if (t1 == null) { @@ -13513,7 +13561,7 @@ t1.storedCallback = null; f.call$0(); }, - $signature: 4 + $signature: 6 }; A._AsyncRun__initializeScheduleImmediate_closure.prototype = { call$1(callback) { @@ -13658,7 +13706,7 @@ var errorCode = this.controller.cancelationFuture != null ? 2 : 0; this.bodyFunction.call$2(errorCode, null); }, - $signature: 4 + $signature: 6 }; A._AsyncStarStreamController.prototype = { _AsyncStarStreamController$1(body, $T) { @@ -14119,7 +14167,7 @@ call$1(__wc0_formal) { this.joinedResult._completeWithResultOf$1(this.originalSource); }, - $signature: 4 + $signature: 6 }; A._Future__propagateToListeners_handleWhenCompleteCallback_closure0.prototype = { call$2(e, s) { @@ -14127,7 +14175,7 @@ type$.StackTrace._as(s); this.joinedResult._completeErrorObject$1(new A.AsyncError(e, s)); }, - $signature: 5 + $signature: 4 }; A._Future__propagateToListeners_handleValueCallback.prototype = { call$0() { @@ -14227,7 +14275,7 @@ this._future._completeErrorObject$1(new A.AsyncError(e, s)); } }, - $signature: 5 + $signature: 4 }; A._AsyncCallbackEntry.prototype = {}; A.Stream.prototype = { @@ -14580,7 +14628,7 @@ t1._addError$2(A._asObject(e), type$.StackTrace._as(s)); t1._close$0(); }, - $signature: 5 + $signature: 4 }; A._AddStreamState_cancel_closure.prototype = { call$0() { @@ -14794,7 +14842,7 @@ _this._state = t1; } } - for (; true; wasInputPaused = isInputPaused) { + for (;; wasInputPaused = isInputPaused) { if ((t1 & 8) !== 0) { _this._pending = null; return; @@ -14835,7 +14883,7 @@ else t1._completeErrorObject$1(new A.AsyncError(error, stackTrace)); }, - $signature: 5 + $signature: 4 }; A._BufferingStreamSubscription_asFuture__closure.prototype = { call$0() { @@ -15823,7 +15871,7 @@ call$1(v) { return this.K._is(v); }, - $signature: 12 + $signature: 15 }; A._HashMapKeyIterable.prototype = { get$length(_) { @@ -15904,7 +15952,7 @@ call$1(v) { return this.K._is(v); }, - $signature: 12 + $signature: 15 }; A._HashSet.prototype = { get$iterator(_) { @@ -16323,11 +16371,13 @@ return A.SubListIterable$(receiver, start, end, A.instanceType(receiver)._eval$1("ListBase.E")); }, fillRange$3(receiver, start, end, fill) { - var i; - A.instanceType(receiver)._eval$1("ListBase.E")._as(fill); + var value, i, + t1 = A.instanceType(receiver); + t1._eval$1("ListBase.E?")._as(fill); + value = fill == null ? t1._eval$1("ListBase.E")._as(fill) : fill; A.RangeError_checkValidRange(start, end, this.get$length(receiver)); for (i = start; i < end; ++i) - this.$indexSet(receiver, i, fill); + this.$indexSet(receiver, i, value); }, setRange$4(receiver, start, end, iterable, skipCount) { var $length, otherStart, otherList, t1, i; @@ -16686,7 +16736,7 @@ return -1; } compare = _this._compare; - for (comparison = _null, current = root, newTreeLeft = comparison, left = newTreeLeft, newTreeRight = left, right = newTreeRight; true;) { + for (comparison = _null, current = root, newTreeLeft = comparison, left = newTreeLeft, newTreeRight = left, right = newTreeRight;;) { comparison = compare.call$2(current.key, key); if (comparison > 0) { currentLeft = current._left; @@ -16754,7 +16804,7 @@ _splayMin$1(node) { var current, modified, left; this.$ti._eval$1("_SplayTree.1")._as(node); - for (current = node, modified = 0; true; current = left, modified = 1) { + for (current = node, modified = 0;; current = left, modified = 1) { left = current._left; if (left != null) { current.set$_left(left._right); @@ -16768,7 +16818,7 @@ _splayMax$1(node) { var current, modified, right; this.$ti._eval$1("_SplayTree.1")._as(node); - for (current = node, modified = 0; true; current = right, modified = 1) { + for (current = node, modified = 0;; current = right, modified = 1) { right = current._right; if (right != null) { current.set$_right(right._left); @@ -16836,7 +16886,7 @@ node = B.JSArray_methods.get$last(t1); next = node._right; if (next != null) { - for (; next != null;) { + while (next != null) { B.JSArray_methods.add$1(t1, next); next = next._left; } @@ -16845,7 +16895,7 @@ if (0 >= t1.length) return A.ioore(t1, -1); t1.pop(); - while (true) { + for (;;) { if (!(t1.length !== 0 && B.JSArray_methods.get$last(t1)._right === node)) break; if (0 >= t1.length) @@ -17242,7 +17292,7 @@ endLength = B.JSInt_methods.$mod(t2 - 1, 4) + 1; if (endLength === 1) throw A.wrapException(A.FormatException$(_s31_, source, end)); - for (; endLength < 4;) { + while (endLength < 4) { t1 += "="; buffer._contents = t1; ++endLength; @@ -17850,8 +17900,8 @@ return A.ioore(bytes, start); byte = bytes[start]; $label0$0: - for (t2 = _this.allowMalformed; true;) { - for (; true; i = i0) { + for (t2 = _this.allowMalformed;;) { + for (;; i = i0) { if (!(byte >= 0 && byte < 256)) return A.ioore(_s256_, byte); type = _s256_.charCodeAt(byte) & 31; @@ -17903,7 +17953,7 @@ return A.ioore(bytes, i); byte = bytes[i]; if (byte < 128) { - while (true) { + for (;;) { if (!(i0 < end)) { markEnd = end; break; @@ -18199,7 +18249,7 @@ if (resultDigits[i] < estimatedQuotientDigit) { tmpUsed = A._BigIntImpl__dlShiftDigits(nyDigits, yUsed0, j, tmpDigits); A._BigIntImpl__absSub(resultDigits, resultUsed1, tmpDigits, tmpUsed, resultDigits); - for (; --estimatedQuotientDigit, resultDigits[i] < estimatedQuotientDigit;) + while (--estimatedQuotientDigit, resultDigits[i] < estimatedQuotientDigit) A._BigIntImpl__absSub(resultDigits, resultUsed1, tmpDigits, tmpUsed, resultDigits); } --i; @@ -18252,7 +18302,7 @@ decimalDigitChunks = A._setArrayType([], type$.JSArray_String); t1 = _this._isNegative; rest = t1 ? _this.$negate(0) : _this; - for (; rest._used > 1;) { + while (rest._used > 1) { t2 = $.$get$_BigIntImpl__bigInt10000(); if (t2._used === 0) A.throwExpression(B.C_IntegerDivisionByZeroException); @@ -18284,7 +18334,7 @@ hash = hash + ((hash & 524287) << 10) & 536870911; return hash ^ hash >>> 6; }, - $signature: 27 + $signature: 54 }; A._BigIntImpl_hashCode_finish.prototype = { call$1(hash) { @@ -18292,7 +18342,7 @@ hash ^= hash >>> 11; return hash + ((hash & 16383) << 15) & 536870911; }, - $signature: 53 + $signature: 52 }; A.DateTime.prototype = { $eq(_, other) { @@ -18706,29 +18756,11 @@ }, $isStringSink: 1 }; - A.Uri__parseIPv4Address_error.prototype = { - call$2(msg, position) { - throw A.wrapException(A.FormatException$("Illegal IPv4 address, " + msg, this.host, position)); - }, - $signature: 44 - }; A.Uri_parseIPv6Address_error.prototype = { call$2(msg, position) { throw A.wrapException(A.FormatException$("Illegal IPv6 address, " + msg, this.host, position)); }, - $signature: 40 - }; - A.Uri_parseIPv6Address_parseHex.prototype = { - call$2(start, end) { - var value; - if (end - start > 4) - this.error.call$2("an IPv6 part can only contain a maximum of 4 hex digits", start); - value = A.int_parse(B.JSString_methods.substring$2(this.host, start, end), 16); - if (value < 0 || value > 65535) - this.error.call$2("each part must be in the range of `0x0..0xFFFF`", start); - return value; - }, - $signature: 27 + $signature: 43 }; A._Uri.prototype = { get$_text() { @@ -18870,7 +18902,7 @@ } baseEnd = B.JSString_methods.lastIndexOf$1(base, "/"); t1 = base.length; - while (true) { + for (;;) { if (!(baseEnd > 0 && backCount > 0)) break; newEnd = B.JSString_methods.lastIndexOf$2(base, "/", baseEnd - 1); @@ -19257,7 +19289,7 @@ baseStart = base._pathStart; baseEnd = base._queryStart; if (baseStart === baseEnd && base._hostStart > 0) { - for (; B.JSString_methods.startsWith$2(t2, "../", refStart);) + while (B.JSString_methods.startsWith$2(t2, "../", refStart)) refStart += 3; delta = baseStart - refStart + 1; return new A._SimpleUri(B.JSString_methods.substring$2(base._uri, 0, baseStart) + "/" + B.JSString_methods.substring$1(t2, refStart), base._schemeEnd, base._hostStart, base._portStart, baseStart, t1 + delta, ref._fragmentStart + delta, base._schemeCache); @@ -19270,7 +19302,7 @@ for (baseStart0 = baseStart; B.JSString_methods.startsWith$2(baseUri, "../", baseStart0);) baseStart0 += 3; backCount = 0; - while (true) { + for (;;) { refStart0 = refStart + 3; if (!(refStart0 <= t1 && B.JSString_methods.startsWith$2(t2, "../", refStart))) break; @@ -19349,6 +19381,12 @@ $isUri: 1 }; A._DataUri.prototype = {}; + A.NullRejectionException.prototype = { + toString$0(_) { + return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; + }, + $isException: 1 + }; A.FutureOfJSAnyToJSPromise_get_toJS_closure.prototype = { call$2(resolve, reject) { var t1 = type$.JavaScriptFunction; @@ -19411,7 +19449,7 @@ t1 = this.reject; t1.call(t1, wrapper); }, - $signature: 5 + $signature: 4 }; A.jsify__convert.prototype = { call$1(o) { @@ -19471,7 +19509,7 @@ } if (o instanceof RegExp) throw A.wrapException(A.ArgumentError$("structured clone of RegExp", null)); - if (typeof Promise != "undefined" && o instanceof Promise) + if (o instanceof Promise) return A.promiseToFuture(o, type$.nullable_Object); proto = Object.getPrototypeOf(o); if (proto === Object.prototype || proto === null) { @@ -19505,12 +19543,6 @@ }, $signature: 11 }; - A.NullRejectionException.prototype = { - toString$0(_) { - return "Promise was rejected with a value of `" + (this.isUndefined ? "undefined" : "null") + "`."; - }, - $isException: 1 - }; A._JSRandom.prototype = { nextInt$1(max) { if (max <= 0 || max > 4294967296) @@ -19542,7 +19574,7 @@ t1.setUint32(0, 0, false); start = 4 - byteCount; randomLimit = A._asInt(Math.pow(256, byteCount)); - for (t2 = max - 1, t3 = (max & t2) >>> 0 === 0; true;) { + for (t2 = max - 1, t3 = (max & t2) >>> 0 === 0;;) { crypto.getRandomValues(J.asUint8List$2$x(B.NativeByteData_methods.get$buffer(t1), start, byteCount)); random = t1.getUint32(0, false); if (t3) @@ -19660,7 +19692,7 @@ type$.StackTrace._as(stackTrace); this.$this._addResult$1(new A.ErrorResult(error, stackTrace)); }, - $signature: 5 + $signature: 4 }; A.StreamQueue__ensureListening_closure0.prototype = { call$0() { @@ -19924,7 +19956,7 @@ call$1(k) { return this.multimap.$index(0, k); }, - $signature: 6 + $signature: 5 }; A.BuiltListMultimap_hashCode_closure.prototype = { call$1(key) { @@ -19960,7 +19992,7 @@ t1 = _this.__ListMultimapBuilder__builderMap_A; t1 === $ && A.throwLateFieldNI("_builderMap"); t1 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterator<1>")); - for (; t1.moveNext$0();) { + while (t1.moveNext$0()) { key = t1.__js_helper$_current; t2 = _this.__ListMultimapBuilder__builderMap_A.$index(0, key); builtList = t2._listOwner; @@ -20081,7 +20113,7 @@ call$1(k) { return this.multimap.$index(0, k); }, - $signature: 6 + $signature: 5 }; A.BuiltMap.prototype = { toBuilder$0() { @@ -20148,7 +20180,7 @@ call$1(k) { return this.map.$index(0, k); }, - $signature: 6 + $signature: 5 }; A.BuiltMap_hashCode_closure.prototype = { call$1(key) { @@ -20515,7 +20547,7 @@ t1 = _this.__SetMultimapBuilder__builderMap_A; t1 === $ && A.throwLateFieldNI("_builderMap"); t1 = new A.LinkedHashMapKeyIterator(t1, t1._modifications, t1._first, A._instanceType(t1)._eval$1("LinkedHashMapKeyIterator<1>")); - for (; t1.moveNext$0();) { + while (t1.moveNext$0()) { key = t1.__js_helper$_current; t2 = _this.__SetMultimapBuilder__builderMap_A.$index(0, key); builtSet = t2._setOwner; @@ -20630,7 +20662,7 @@ call$1(k) { return this.multimap.$index(0, k); }, - $signature: 6 + $signature: 5 }; A.EnumClass.prototype = { toString$0(_) { @@ -20783,27 +20815,27 @@ var t1 = type$.Object; return A.ListMultimapBuilder_ListMultimapBuilder(t1, t1); }, - $signature: 34 + $signature: 33 }; A.Serializers_Serializers_closure1.prototype = { call$0() { var t1 = type$.Object; return A.MapBuilder_MapBuilder(t1, t1); }, - $signature: 35 + $signature: 34 }; A.Serializers_Serializers_closure2.prototype = { call$0() { return A.SetBuilder_SetBuilder(type$.Object); }, - $signature: 36 + $signature: 35 }; A.Serializers_Serializers_closure3.prototype = { call$0() { var t1 = type$.Object; return A.SetMultimapBuilder_SetMultimapBuilder(t1, t1); }, - $signature: 92 + $signature: 36 }; A.FullType.prototype = { $eq(_, other) { @@ -22202,7 +22234,7 @@ return true; it1 = J.get$iterator$ax(elements1); it2 = J.get$iterator$ax(elements2); - for (t1 = this._elementEquality; true;) { + for (t1 = this._elementEquality;;) { hasNext = it1.moveNext$0(); if (hasNext !== it2.moveNext$0()) return false; @@ -22625,7 +22657,7 @@ var t1, value, result = new A.ConnectRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -22724,7 +22756,7 @@ var t1, value, result = new A.DebugEventBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23025,7 +23057,7 @@ var t1, value, result = new A.DebugInfoBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23197,7 +23229,7 @@ var t1, value, result = new A.DevToolsRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23268,7 +23300,7 @@ _s16_ = "DevToolsResponse", result = new A.DevToolsResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23415,7 +23447,7 @@ _s13_ = "ErrorResponse", result = new A.ErrorResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23522,7 +23554,7 @@ _s16_ = "ExtensionRequest", result = new A.ExtensionRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23582,7 +23614,7 @@ _s17_ = "ExtensionResponse", result = new A.ExtensionResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23641,7 +23673,7 @@ _s14_ = "ExtensionEvent", result = new A.ExtensionEventBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -23949,7 +23981,7 @@ var t1, value, $$v, _$result, result = new A.HotReloadRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24036,7 +24068,7 @@ var t1, value, result = new A.HotReloadResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24136,7 +24168,7 @@ var t1, value, $$v, _$result, result = new A.HotRestartRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24223,7 +24255,7 @@ var t1, value, result = new A.HotRestartResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24416,7 +24448,7 @@ var t1, value, $$v, result = new A.RegisterEventBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24544,13 +24576,13 @@ call$0() { return A.ListBuilder_ListBuilder(B.List_empty0, type$.DebugEvent); }, - $signature: 41 + $signature: 40 }; A._$serializers_closure0.prototype = { call$0() { return A.ListBuilder_ListBuilder(B.List_empty0, type$.ExtensionEvent); }, - $signature: 42 + $signature: 41 }; A.ServiceExtensionRequest.prototype = {}; A._$ServiceExtensionRequestSerializer.prototype = { @@ -24566,7 +24598,7 @@ _s23_ = "ServiceExtensionRequest", result = new A.ServiceExtensionRequestBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24662,7 +24694,7 @@ b.get$_service_extension_response$_$this()._service_extension_response$_errorMessage = _this.errorMessage; return b; }, - $signature: 43 + $signature: 42 }; A._$ServiceExtensionResponseSerializer.prototype = { serialize$3$specifiedType(serializers, object, specifiedType) { @@ -24693,7 +24725,7 @@ var t1, value, result = new A.ServiceExtensionResponseBuilder(), iterator = J.get$iterator$ax(type$.Iterable_nullable_Object._as(serialized)); - for (; iterator.moveNext$0();) { + while (iterator.moveNext$0()) { t1 = iterator.get$current(); t1.toString; A._asString(t1); @@ -24803,7 +24835,7 @@ var $async$_batchAndSendEvents$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -24948,14 +24980,14 @@ call$1(o) { return J.toString$0$(o); }, - $signature: 45 + $signature: 44 }; A.safeUnawaited_closure.prototype = { call$2(error, stackTrace) { type$.StackTrace._as(stackTrace); return $.$get$_logger().log$4(B.Level_WARNING_900, "Error in unawaited Future:", error, stackTrace); }, - $signature: 21 + $signature: 22 }; A.Int32.prototype = { _toInt$1(val) { @@ -25088,7 +25120,7 @@ var $async$_sendUnstreamed$3 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -25125,13 +25157,13 @@ call$2(key1, key2) { return A._asString(key1).toLowerCase() === A._asString(key2).toLowerCase(); }, - $signature: 46 + $signature: 45 }; A.BaseRequest_closure0.prototype = { call$1(key) { return B.JSString_methods.get$hashCode(A._asString(key).toLowerCase()); }, - $signature: 47 + $signature: 46 }; A.BaseResponse.prototype = { BaseResponse$7$contentLength$headers$isRedirect$persistentConnection$reasonPhrase$request(statusCode, contentLength, headers, isRedirect, persistentConnection, reasonPhrase, request) { @@ -25158,7 +25190,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -25290,20 +25322,20 @@ $defaultValues() { return [null]; }, - $signature: 48 + $signature: 47 }; A._readBody_closure.prototype = { call$1(_) { return null; }, - $signature: 4 + $signature: 6 }; A._readBody_closure0.prototype = { call$1(_) { A._asObject(_); return this._box_0.isError; }, - $signature: 49 + $signature: 48 }; A.ByteStream.prototype = { toBytes$0() { @@ -25318,7 +25350,7 @@ call$1(bytes) { return this.completer.complete$1(new Uint8Array(A._ensureNativeList(type$.List_int._as(bytes)))); }, - $signature: 50 + $signature: 49 }; A.ClientException.prototype = { toString$0(_) { @@ -25364,7 +25396,7 @@ scanner.scan$1(t2); t6 = type$.String; parameters = A.LinkedHashMap_LinkedHashMap$_empty(t6, t6); - while (true) { + for (;;) { t6 = scanner._lastMatch = B.JSString_methods.matchAsPrefix$2(";", t1, scanner._string_scanner$_position); t7 = scanner._lastMatchPosition = scanner._string_scanner$_position; success = t6 != null; @@ -25406,7 +25438,7 @@ scanner.expectDone$0(); return A.MediaType$(t4, t5, parameters); }, - $signature: 51 + $signature: 50 }; A.MediaType_toString_closure.prototype = { call$2(attribute, value) { @@ -25425,7 +25457,7 @@ } else t1._contents = t3 + value; }, - $signature: 52 + $signature: 51 }; A.MediaType_toString__closure.prototype = { call$1(match) { @@ -25528,7 +25560,7 @@ $parent._children.$indexSet(0, thisName, t1); return t1; }, - $signature: 54 + $signature: 53 }; A.Context.prototype = { absolute$15(part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15) { @@ -25687,7 +25719,7 @@ t2 = false; if (t2) return pathParsed.toString$0(0); - while (true) { + for (;;) { t2 = fromParsed.parts; t3 = t2.length; t4 = false; @@ -25762,20 +25794,20 @@ call$1(part) { return A._asString(part) !== ""; }, - $signature: 22 + $signature: 27 }; A.Context_split_closure.prototype = { call$1(part) { return A._asString(part).length !== 0; }, - $signature: 22 + $signature: 27 }; A._validateArgList_closure.prototype = { call$1(arg) { A._asStringQ(arg); return arg == null ? "null" : '"' + arg + '"'; }, - $signature: 56 + $signature: 92 }; A.InternalStyle.prototype = { getRoot$1(path) { @@ -25798,7 +25830,7 @@ A.ParsedPath.prototype = { removeTrailingSeparators$0() { var t1, t2, _this = this; - while (true) { + for (;;) { t1 = _this.parts; if (!(t1.length !== 0 && B.JSArray_methods.get$last(t1) === "")) break; @@ -26140,7 +26172,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -26204,7 +26236,7 @@ }, _runOnRelease$1(onRelease) { var t1, t2; - A.Future_Future$sync(type$.dynamic_Function._as(onRelease), type$.dynamic).then$1$1(new A.Pool__runOnRelease_closure(this), type$.Null).catchError$1(new A.Pool__runOnRelease_closure0(this)); + A.Future_Future$sync(type$.void_Function._as(onRelease), type$.void).then$1$1(new A.Pool__runOnRelease_closure(this), type$.Null).catchError$1(new A.Pool__runOnRelease_closure0(this)); t1 = new A._Future($.Zone__current, type$._Future_PoolResource); t2 = this._onReleaseCompleters; t2._collection$_add$1(t2.$ti._precomputed1._as(new A._SyncCompleter(t1, type$._SyncCompleter_PoolResource))); @@ -26229,7 +26261,7 @@ var t1 = this.$this; t1._onReleaseCompleters.removeFirst$0().complete$1(new A.PoolResource(t1)); }, - $signature: 4 + $signature: 56 }; A.Pool__runOnRelease_closure0.prototype = { call$2(error, stackTrace) { @@ -26237,7 +26269,7 @@ type$.StackTrace._as(stackTrace); this.$this._onReleaseCompleters.removeFirst$0().completeError$2(error, stackTrace); }, - $signature: 5 + $signature: 4 }; A.PoolResource.prototype = {}; A.SourceFile.prototype = { @@ -26677,14 +26709,14 @@ t2 = A._arrayInstanceType(t1); return new A.WhereIterable(t1, t2._eval$1("bool(1)")._as(new A.Highlighter$___closure()), t2._eval$1("WhereIterable<1>")).get$length(0); }, - $signature: 33 + $signature: 32 }; A.Highlighter$___closure.prototype = { call$1(highlight) { var t1 = type$._Highlight._as(highlight).span; return t1.get$start().get$line() !== t1.get$end().get$line(); }, - $signature: 17 + $signature: 12 }; A.Highlighter$__closure0.prototype = { call$1(line) { @@ -26753,14 +26785,14 @@ call$1(highlight) { return type$._Highlight._as(highlight).span.get$end().get$line() < this.line.number; }, - $signature: 17 + $signature: 12 }; A.Highlighter_highlight_closure.prototype = { call$1(highlight) { type$._Highlight._as(highlight); return true; }, - $signature: 17 + $signature: 12 }; A.Highlighter__writeFileStart_closure.prototype = { call$0() { @@ -26858,7 +26890,7 @@ t2._contents = t4; return t4.length - t3.length; }, - $signature: 23 + $signature: 20 }; A.Highlighter__writeIndicator_closure0.prototype = { call$0() { @@ -26878,7 +26910,7 @@ t1._writeArrow$3$beginning(_this.line, Math.max(_this.highlight.span.get$end().get$column() - 1, 0), false); return t2._contents.length - t3.length; }, - $signature: 23 + $signature: 20 }; A.Highlighter__writeSidebar_closure.prototype = { call$0() { @@ -27157,7 +27189,7 @@ var $async$_onOutgoingMessage$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -27218,7 +27250,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -27386,7 +27418,7 @@ A._GuaranteeSink__addError_closure.prototype = { call$1(_) { }, - $signature: 4 + $signature: 6 }; A.StreamChannelController.prototype = {}; A.StreamChannelMixin.prototype = {$isStreamChannel: 1}; @@ -27672,7 +27704,7 @@ var $async$close$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -27919,7 +27951,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -27996,7 +28028,7 @@ var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28087,13 +28119,13 @@ path.toString; return A.FutureOfJSAnyToJSPromise_get_toJS(this.manager._restarter.hotReloadStart$1(path), type$.JSArray_nullable_Object); }, - $signature: 10 + $signature: 9 }; A.main__closure0.prototype = { call$0() { return A.FutureOfVoidToJSPromise_get_toJS(this.manager.hotReloadEnd$0()); }, - $signature: 10 + $signature: 9 }; A.main__closure1.prototype = { call$2(runId, pauseIsolatesOnStart) { @@ -28238,7 +28270,7 @@ var $async$call$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28394,7 +28426,7 @@ A.main__closure8.prototype = { call$1(error) { }, - $signature: 4 + $signature: 6 }; A.main__closure9.prototype = { call$1(e) { @@ -28413,7 +28445,7 @@ type$.StackTrace._as(stackTrace); A.print("Unhandled error detected in the injected client.js script.\n\nYou can disable this script in webdev by passing --no-injected-client if it\nis preventing your app from loading, but note that this will also prevent\nall debugging and hot reload/restart functionality from working.\n\nThe original error is below, please file an issue at\nhttps://github.com/dart-lang/webdev/issues/new and attach this output:\n\n" + A.S(error) + "\n" + stackTrace.toString$0(0) + "\n"); }, - $signature: 9 + $signature: 10 }; A._sendConnectRequest_closure.prototype = { call$1(b) { @@ -28481,7 +28513,7 @@ var $async$_runMainWhenReady$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28509,7 +28541,7 @@ var $async$_getSrcModuleLibraries$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28544,7 +28576,7 @@ var $async$restart$3$readyToRunMain$reloadedSourcesPath$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28583,7 +28615,7 @@ var $async$hotReloadStart$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28627,7 +28659,7 @@ var $async$hotReloadEnd$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28650,7 +28682,7 @@ var $async$handleServiceExtension$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28725,13 +28757,13 @@ A._asJSObject(A._asJSObject(init.G.dartDevEmbedder).config).capturedMainHandler = null; A.safeUnawaited(this.$this._runMainWhenReady$2(this.readyToRunMain, runMain)); }, - $signature: 20 + $signature: 23 }; A.DdcLibraryBundleRestarter_hotReloadStart_closure.prototype = { call$1(hotReloadEndCallback) { this.$this._capturedHotReloadEndCallback = type$.JavaScriptFunction._as(hotReloadEndCallback); }, - $signature: 20 + $signature: 23 }; A.DdcRestarter.prototype = { restart$3$readyToRunMain$reloadedSourcesPath$runId(readyToRunMain, reloadedSourcesPath, runId) { @@ -28741,7 +28773,7 @@ var $async$restart$3$readyToRunMain$reloadedSourcesPath$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28799,7 +28831,7 @@ var $async$hotRestart$3$readyToRunMain$reloadedSourcesPath$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28836,7 +28868,7 @@ var $async$hotReloadEnd$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28860,7 +28892,7 @@ var $async$handleServiceExtension$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -28913,7 +28945,7 @@ var $async$restart$3$readyToRunMain$reloadedSourcesPath$runId = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29000,7 +29032,7 @@ var $async$_require_restarter$_runMainWhenReady$1 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29028,7 +29060,7 @@ var $async$_getDigests$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29056,7 +29088,7 @@ var $async$_initialize$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) { if ($async$errorCode === 1) return A._asyncRethrow($async$result, $async$completer); - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29114,7 +29146,7 @@ $async$errorStack.push($async$result); $async$goto = $async$handler; } - while (true) + for (;;) switch ($async$goto) { case 0: // Function start @@ -29310,7 +29342,7 @@ call$0() { return A._asJSObject(A._asJSObject(init.G.document).createElement("script")); }, - $signature: 10 + $signature: 9 }; A._createScript__closure0.prototype = { call$0() { @@ -29318,7 +29350,7 @@ scriptElement.setAttribute("nonce", this.nonce); return scriptElement; }, - $signature: 10 + $signature: 9 }; A.runMain_closure.prototype = { call$0() { @@ -29367,13 +29399,13 @@ _instance_1_i = hunkHelpers._instance_1i, _instance_1_u = hunkHelpers._instance_1u, _instance_0_u = hunkHelpers._instance_0u; - _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 32); + _static_2(J, "_interceptors_JSArray__compareAny$closure", "JSArray__compareAny", 31); _static_1(A, "async__AsyncRun__scheduleImmediateJsOverride$closure", "_AsyncRun__scheduleImmediateJsOverride", 13); _static_1(A, "async__AsyncRun__scheduleImmediateWithSetImmediate$closure", "_AsyncRun__scheduleImmediateWithSetImmediate", 13); _static_1(A, "async__AsyncRun__scheduleImmediateWithTimer$closure", "_AsyncRun__scheduleImmediateWithTimer", 13); _static_0(A, "async___startMicrotaskLoop$closure", "_startMicrotaskLoop", 0); _static_1(A, "async___nullDataHandler$closure", "_nullDataHandler", 7); - _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 9); + _static_2(A, "async___nullErrorHandler$closure", "_nullErrorHandler", 10); _static_0(A, "async___nullDoneHandler$closure", "_nullDoneHandler", 0); _static(A, "async___rootHandleUncaughtError$closure", 5, null, ["call$5"], ["_rootHandleUncaughtError"], 94, 0); _static(A, "async___rootRun$closure", 4, null, ["call$1$4", "call$4"], ["_rootRun", function($self, $parent, zone, f) { @@ -29407,15 +29439,15 @@ _static(A, "async___rootFork$closure", 5, null, ["call$5"], ["_rootFork"], 107, 0); _instance(A._Completer.prototype, "get$completeError", 0, 1, function() { return [null]; - }, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 31, 0, 0); - _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 9); + }, ["call$2", "call$1"], ["completeError$2", "completeError$1"], 21, 0, 0); + _instance_2_u(A._Future.prototype, "get$_completeError", "_completeError$2", 10); var _; _instance_1_i(_ = A._StreamController.prototype, "get$add", "add$1", 8); _instance(_, "get$addError", 0, 1, function() { return [null]; - }, ["call$2", "call$1"], ["addError$2", "addError$1"], 31, 0, 0); + }, ["call$2", "call$1"], ["addError$2", "addError$1"], 21, 0, 0); _instance_1_u(_, "get$_add", "_add$1", 8); - _instance_2_u(_, "get$_addError", "_addError$2", 9); + _instance_2_u(_, "get$_addError", "_addError$2", 10); _instance_0_u(_, "get$_close", "_close$0", 0); _instance_0_u(_ = A._ControllerSubscription.prototype, "get$_onPause", "_onPause$0", 0); _instance_0_u(_, "get$_onResume", "_onResume$0", 0); @@ -29425,23 +29457,23 @@ _instance_0_u(_ = A._ForwardingStreamSubscription.prototype, "get$_onPause", "_onPause$0", 0); _instance_0_u(_, "get$_onResume", "_onResume$0", 0); _instance_1_u(_, "get$_handleData", "_handleData$1", 8); - _instance_2_u(_, "get$_handleError", "_handleError$2", 21); + _instance_2_u(_, "get$_handleError", "_handleError$2", 22); _instance_0_u(_, "get$_handleDone", "_handleDone$0", 0); _static_2(A, "collection___defaultEquals$closure", "_defaultEquals0", 18); - _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 15); - _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 32); - _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 6); + _static_1(A, "collection___defaultHashCode$closure", "_defaultHashCode", 17); + _static_2(A, "collection_ListBase__compareAny$closure", "ListBase__compareAny", 31); + _static_1(A, "convert___defaultToEncodable$closure", "_defaultToEncodable", 5); _instance_1_i(_ = A._ByteCallbackSink.prototype, "get$add", "add$1", 8); _instance_0_u(_, "get$close", "close$0", 0); - _static_1(A, "core__identityHashCode$closure", "identityHashCode", 15); + _static_1(A, "core__identityHashCode$closure", "identityHashCode", 17); _static_2(A, "core__identical$closure", "identical", 18); _static_1(A, "core_Uri_decodeComponent$closure", "Uri_decodeComponent", 16); _static(A, "math__max$closure", 2, null, ["call$1$2", "call$2"], ["max", function(a, b) { return A.max(a, b, type$.num); }], 108, 1); _instance_2_u(_ = A.DeepCollectionEquality.prototype, "get$equals", "equals$2", 18); - _instance_1_u(_, "get$hash", "hash$1", 15); - _instance_1_u(_, "get$isValidKey", "isValidKey$1", 12); + _instance_1_u(_, "get$hash", "hash$1", 17); + _instance_1_u(_, "get$isValidKey", "isValidKey$1", 15); _static(A, "hot_reload_response_HotReloadResponse___new_tearOff$closure", 0, null, ["call$1", "call$0"], ["HotReloadResponse___new_tearOff", function() { return A.HotReloadResponse___new_tearOff(null); }], 109, 0); @@ -29474,7 +29506,7 @@ _inherit(A._EfficientLengthCastIterable, A.CastIterable); _inherit(A._CastListBase, A.__CastListBase__CastIterableBase_ListMixin); _inheritMany(A.Closure, [A.Closure2Args, A.Closure0Args, A.Instantiation, A.TearOffClosure, A.initHooks_closure, A.initHooks_closure1, A._AsyncRun__initializeScheduleImmediate_internalCallback, A._AsyncRun__initializeScheduleImmediate_closure, A._awaitOnObject_closure, A._asyncStarHelper_closure0, A._Future__propagateToListeners_handleWhenCompleteCallback_closure, A._Future_timeout_closure0, A.Stream_length_closure, A.Stream_first_closure0, A._CustomZone_bindUnaryCallback_closure, A._CustomZone_bindUnaryCallbackGuarded_closure, A._RootZone_bindUnaryCallback_closure, A._RootZone_bindUnaryCallbackGuarded_closure, A.runZonedGuarded_closure, A._CustomHashMap_closure, A._LinkedCustomHashMap_closure, A._BigIntImpl_hashCode_finish, A._Uri__makePath_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure, A.FutureOfVoidToJSPromise_get_toJS__closure, A.jsify__convert, A.promiseToFuture_closure, A.promiseToFuture_closure0, A.dartify_convert, A.StreamQueue__ensureListening_closure, A.BuiltListMultimap_BuiltListMultimap_closure, A.BuiltListMultimap_hashCode_closure, A.ListMultimapBuilder_replace_closure, A.BuiltMap_BuiltMap_closure, A.BuiltMap_hashCode_closure, A.BuiltSet_hashCode_closure, A.BuiltSetMultimap_hashCode_closure, A.SetMultimapBuilder_replace_closure, A.newBuiltValueToStringHelper_closure, A.BuiltListMultimapSerializer_serialize_closure, A.BuiltListMultimapSerializer_deserialize_closure, A.BuiltListSerializer_serialize_closure, A.BuiltListSerializer_deserialize_closure, A.BuiltSetMultimapSerializer_serialize_closure, A.BuiltSetMultimapSerializer_deserialize_closure, A.BuiltSetSerializer_serialize_closure, A.BuiltSetSerializer_deserialize_closure, A.ListSerializer_serialize_closure, A.SetSerializer_serialize_closure, A.CanonicalizedMap_keys_closure, A.ServiceExtensionResponse_ServiceExtensionResponse$fromResult_closure, A.WebSocketClient_stream_closure, A.BaseRequest_closure0, A.BrowserClient_send_closure, A._readBody_closure, A._readBody_closure0, A.ByteStream_toBytes_closure, A.MediaType_toString__closure, A.expectQuotedString_closure, A.Context_joinAll_closure, A.Context_split_closure, A._validateArgList_closure, A.Pool__runOnRelease_closure, A.Highlighter$__closure, A.Highlighter$___closure, A.Highlighter$__closure0, A.Highlighter__collateLines_closure, A.Highlighter__collateLines_closure1, A.Highlighter__collateLines__closure, A.Highlighter_highlight_closure, A.SseClient_closure0, A.SseClient_closure1, A._GuaranteeSink__addError_closure, A._EventStreamSubscription_closure, A._EventStreamSubscription_onData_closure, A.BrowserWebSocket_connect_closure, A.BrowserWebSocket_connect_closure0, A.BrowserWebSocket_connect_closure1, A.BrowserWebSocket_connect_closure2, A.AdapterWebSocketChannel_closure, A.AdapterWebSocketChannel__closure, A.AdapterWebSocketChannel__closure0, A.AdapterWebSocketChannel_closure0, A.main__closure1, A.main__closure3, A.main___closure2, A.main___closure1, A.main__closure5, A.main___closure0, A.main___closure, A.main__closure7, A.main__closure8, A.main__closure9, A._sendConnectRequest_closure, A._launchCommunicationWithDebugExtension_closure, A._handleAuthRequest_closure, A._sendResponse_closure, A.DdcLibraryBundleRestarter_restart_closure, A.DdcLibraryBundleRestarter_hotReloadStart_closure, A.DdcRestarter_restart_closure0, A.DdcRestarter_restart_closure, A.RequireRestarter__reloadModule_closure0, A.JSArrayExtension_toDartIterable_closure]); - _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.ConstantMap_map_closure, A.JsLinkedHashMap_addAll_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure0, A._Future_timeout_closure1, A._AddStreamState_makeErrorHandler_closure, A._BufferingStreamSubscription_asFuture_closure0, A.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A._BigIntImpl_hashCode_combine, A.Uri__parseIPv4Address_error, A.Uri_parseIPv6Address_error, A.Uri_parseIPv6Address_parseHex, A.FutureOfJSAnyToJSPromise_get_toJS_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure0, A.FutureOfVoidToJSPromise_get_toJS_closure, A.FutureOfVoidToJSPromise_get_toJS__closure0, A.StreamQueue__ensureListening_closure1, A.hashObjects_closure, A.MapBuilder_replace_closure, A.CanonicalizedMap_addAll_closure, A.CanonicalizedMap_forEach_closure, A.CanonicalizedMap_map_closure, A.safeUnawaited_closure, A.BaseRequest_closure, A.MediaType_toString_closure, A.Pool__runOnRelease_closure0, A.Highlighter__collateLines_closure0, A.main__closure4, A.main_closure0]); + _inheritMany(A.Closure2Args, [A._CastListBase_sort_closure, A.CastMap_forEach_closure, A.ConstantMap_map_closure, A.JsLinkedHashMap_addAll_closure, A.initHooks_closure0, A._awaitOnObject_closure0, A._wrapJsFunctionForAsync_closure, A._Future__propagateToListeners_handleWhenCompleteCallback_closure0, A._Future_timeout_closure1, A._AddStreamState_makeErrorHandler_closure, A._BufferingStreamSubscription_asFuture_closure0, A.LinkedHashMap_LinkedHashMap$from_closure, A.MapBase_mapToString_closure, A._JsonStringifier_writeMap_closure, A._BigIntImpl_hashCode_combine, A.Uri_parseIPv6Address_error, A.FutureOfJSAnyToJSPromise_get_toJS_closure, A.FutureOfJSAnyToJSPromise_get_toJS__closure0, A.FutureOfVoidToJSPromise_get_toJS_closure, A.FutureOfVoidToJSPromise_get_toJS__closure0, A.StreamQueue__ensureListening_closure1, A.hashObjects_closure, A.MapBuilder_replace_closure, A.CanonicalizedMap_addAll_closure, A.CanonicalizedMap_forEach_closure, A.CanonicalizedMap_map_closure, A.safeUnawaited_closure, A.BaseRequest_closure, A.MediaType_toString_closure, A.Pool__runOnRelease_closure0, A.Highlighter__collateLines_closure0, A.main__closure4, A.main_closure0]); _inherit(A.CastList, A._CastListBase); _inheritMany(A.MapBase, [A.CastMap, A.JsLinkedHashMap, A._HashMap, A._JsonMap]); _inheritMany(A.Error, [A.LateError, A.TypeError, A.JsNoSuchMethodError, A.UnknownJsTypeError, A.RuntimeError, A._Error, A.JsonUnsupportedObjectError, A.AssertionError, A.ArgumentError, A.UnsupportedError, A.UnimplementedError, A.StateError, A.ConcurrentModificationError, A.BuiltValueNullFieldError, A.BuiltValueNestedFieldError, A.DeserializationError]); @@ -29602,7 +29634,7 @@ typeUniverse: {eC: new Map(), tR: {}, eT: {}, tPV: {}, sEA: []}, mangledGlobalNames: {int: "int", double: "double", num: "num", String: "String", bool: "bool", Null: "Null", List: "List", Object: "Object", Map: "Map", JSObject: "JSObject"}, mangledNames: {}, - types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "Null(@)", "Null(Object,StackTrace)", "@(@)", "~(@)", "~(Object?)", "~(Object,StackTrace)", "JSObject()", "Object?(Object?)", "bool(Object?)", "~(~())", "Null(JSObject)", "int(Object?)", "String(String)", "bool(_Highlight)", "bool(Object?,Object?)", "Future<~>()", "Null(JavaScriptFunction)", "~(@,StackTrace)", "bool(String)", "int()", "~(@,@)", "~(Object?,Object?)", "@()", "int(int,int)", "String(Match)", "bool()", "Null(JavaScriptFunction,JavaScriptFunction)", "~(Object[StackTrace?])", "int(@,@)", "int(_Line)", "ListMultimapBuilder()", "MapBuilder()", "SetBuilder()", "int(int,@)", "Object?(~)", "JSObject(Object,StackTrace)", "~(String,int?)", "ListBuilder()", "ListBuilder()", "~(ServiceExtensionResponseBuilder)", "~(String,int)", "String(@)", "bool(String,String)", "int(String)", "Null(String,String[Object?])", "bool(Object)", "~(List)", "MediaType()", "~(String,String)", "int(int)", "Logger()", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "String(String?)", "String?()", "ListBuilder()", "_Future<@>?()", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "~(int,@)", "SourceSpanWithContext()", "Null(@,StackTrace)", "~(String?)", "Future()", "Null(~())", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotRestartResponse([~(HotRestartResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "IndentingBuiltValueToStringHelper(String)", "~(bool)", "@(String)", "bool(bool)", "List(String)", "int(String,String)", "Null(JavaScriptObject)", "JSObject()()", "SetMultimapBuilder()", "@(@,String)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "~(String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "0^(0^,0^)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "DebugInfoBuilder(DebugInfoBuilder)"], + types: ["~()", "Null()", "~(JSObject)", "Object?(@)", "Null(Object,StackTrace)", "@(@)", "Null(@)", "~(@)", "~(Object?)", "JSObject()", "~(Object,StackTrace)", "Object?(Object?)", "bool(_Highlight)", "~(~())", "Null(JSObject)", "bool(Object?)", "String(String)", "int(Object?)", "bool(Object?,Object?)", "Future<~>()", "int()", "~(Object[StackTrace?])", "~(@,StackTrace)", "Null(JavaScriptFunction)", "~(@,@)", "~(Object?,Object?)", "@()", "bool(String)", "String(Match)", "bool()", "Null(JavaScriptFunction,JavaScriptFunction)", "int(@,@)", "int(_Line)", "ListMultimapBuilder()", "MapBuilder()", "SetBuilder()", "SetMultimapBuilder()", "int(int,@)", "Object?(~)", "JSObject(Object,StackTrace)", "ListBuilder()", "ListBuilder()", "~(ServiceExtensionResponseBuilder)", "0&(String,int?)", "String(@)", "bool(String,String)", "int(String)", "Null(String,String[Object?])", "bool(Object)", "~(List)", "MediaType()", "~(String,String)", "int(int)", "Logger()", "int(int,int)", "~(Zone,ZoneDelegate,Zone,Object,StackTrace)", "Null(~)", "String?()", "ListBuilder()", "_Future<@>?()", "Object(_Line)", "Object(_Highlight)", "int(_Highlight,_Highlight)", "List<_Line>(MapEntry>)", "~(int,@)", "SourceSpanWithContext()", "Null(@,StackTrace)", "~(String?)", "Future()", "Null(~())", "Null(WebSocket)", "~(WebSocketEvent)", "Null(Object)", "HotRestartResponse([~(HotRestartResponseBuilder)])", "JSObject(String[bool?])", "~(List)", "ListBuilder(BatchedDebugEventsBuilder)", "Null(String,String)", "DebugEventBuilder(DebugEventBuilder)", "Null(String)", "RegisterEventBuilder(RegisterEventBuilder)", "DevToolsRequestBuilder(DevToolsRequestBuilder)", "Future<~>(String)", "ConnectRequestBuilder(ConnectRequestBuilder)", "IndentingBuiltValueToStringHelper(String)", "~(bool)", "@(String)", "bool(bool)", "List(String)", "int(String,String)", "Null(JavaScriptObject)", "JSObject()()", "String(String?)", "@(@,String)", "~(Zone?,ZoneDelegate?,Zone,Object,StackTrace)", "0^(Zone?,ZoneDelegate?,Zone,0^())", "0^(Zone?,ZoneDelegate?,Zone,0^(1^),1^)", "0^(Zone?,ZoneDelegate?,Zone,0^(1^,2^),1^,2^)", "0^()(Zone,ZoneDelegate,Zone,0^())", "0^(1^)(Zone,ZoneDelegate,Zone,0^(1^))", "0^(1^,2^)(Zone,ZoneDelegate,Zone,0^(1^,2^))", "AsyncError?(Zone,ZoneDelegate,Zone,Object,StackTrace?)", "~(Zone?,ZoneDelegate?,Zone,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~())", "Timer(Zone,ZoneDelegate,Zone,Duration,~(Timer))", "~(Zone,ZoneDelegate,Zone,String)", "~(String)", "Zone(Zone?,ZoneDelegate?,Zone,ZoneSpecification?,Map?)", "0^(0^,0^)", "HotReloadResponse([~(HotReloadResponseBuilder)])", "DebugInfoBuilder(DebugInfoBuilder)"], interceptorsByTag: null, leafTags: null, arrayRti: Symbol("$ti"), @@ -30389,8 +30421,8 @@ t2 = A.ListQueue$(t1), t3 = A.ListQueue$(type$.void_Function); t1 = A.ListQueue$(t1); - t4 = A.Completer_Completer(type$.dynamic); - return new A.Pool(t2, t3, t1, 1000, new A.AsyncMemoizer(t4, A.findType("AsyncMemoizer<@>"))); + t4 = A.Completer_Completer(type$.void); + return new A.Pool(t2, t3, t1, 1000, new A.AsyncMemoizer(t4, A.findType("AsyncMemoizer<~>"))); }); _lazy($, "V1State_random", "$get$V1State_random", () => new A.CryptoRNG()); _lazy($, "V4State_random", "$get$V4State_random", () => new A.CryptoRNG()); diff --git a/dwds/lib/src/services/chrome_proxy_service.dart b/dwds/lib/src/services/chrome_proxy_service.dart index e8bd6c85d..52021020b 100644 --- a/dwds/lib/src/services/chrome_proxy_service.dart +++ b/dwds/lib/src/services/chrome_proxy_service.dart @@ -1030,14 +1030,24 @@ class ChromeProxyService extends ProxyService { }).stream; } + /// If [internalPause] is true, indicates that this was a pause triggered + /// within DWDS, and therefore a `PauseInterrupted` event is never sent to the + /// VM service event stream. Instead, we just wait for the pause to be + /// completed. @override - Future pause(String isolateId) => - wrapInErrorHandlerAsync('pause', () => _pause(isolateId)); + Future pause(String isolateId, {bool internalPause = false}) => + wrapInErrorHandlerAsync( + 'pause', + () => _pause(isolateId, internalPause: internalPause), + ); - Future _pause(String isolateId) async { + Future _pause( + String isolateId, { + required bool internalPause, + }) async { await isInitialized; _checkIsolate('pause', isolateId); - return (await debuggerFuture).pause(); + return (await debuggerFuture).pause(internalPause: internalPause); } // Note: Ignore the optional local parameter, when it is set to `true` the @@ -1181,9 +1191,7 @@ class ChromeProxyService extends ProxyService { }; // Pause and wait for the pause to occur before managing breakpoints. - final pausedEvent = _firstStreamEvent('Debug', EventKind.kPauseInterrupted); - await pause(isolateId); - await pausedEvent; + await pause(isolateId, internalPause: true); await _reinitializeForHotReload(reloadedModulesToLibraries); @@ -1514,11 +1522,6 @@ class ChromeProxyService extends ProxyService { }); } - Future _firstStreamEvent(String streamId, String eventKind) { - final controller = streamControllers[streamId]!; - return controller.stream.firstWhere((event) => event.kind == eventKind); - } - Future _handleDeveloperLog( IsolateRef isolateRef, ConsoleAPIEvent event, diff --git a/dwds/lib/src/version.dart b/dwds/lib/src/version.dart index 5309029da..8e75a061a 100644 --- a/dwds/lib/src/version.dart +++ b/dwds/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '25.1.0'; +const packageVersion = '25.1.0+1-wip'; diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 7c2f9bc0b..331dcb869 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -1,6 +1,6 @@ name: dwds # Every time this changes you need to run `dart run build_runner build`. -version: 25.1.0 +version: 25.1.0+1-wip description: >- A service that proxies between the Chrome debug protocol and the Dart VM diff --git a/dwds/test/hot_reload_breakpoints_test.dart b/dwds/test/hot_reload_breakpoints_test.dart index 7bcb781d3..75fe8cc17 100644 --- a/dwds/test/hot_reload_breakpoints_test.dart +++ b/dwds/test/hot_reload_breakpoints_test.dart @@ -81,7 +81,7 @@ void main() { ); final breakpointAdded = expectLater( stream, - emitsThrough(_hasKind(EventKind.kBreakpointAdded)), + emits(_hasKind(EventKind.kBreakpointAdded)), ); final breakpoint = await client.addBreakpointWithScriptUri( isolateId, @@ -97,7 +97,7 @@ void main() { final isolateId = vm.isolates!.first.id!; final breakpointRemoved = expectLater( stream, - emitsThrough(_hasKind(EventKind.kBreakpointRemoved)), + emits(_hasKind(EventKind.kBreakpointRemoved)), ); await client.removeBreakpoint(isolateId, bp.id!); await breakpointRemoved; @@ -136,9 +136,20 @@ void main() { List<({String file, String breakpointMarker, Breakpoint? bp})> breakpoints, ) async { + final breakpointEvents = expectLater( + stream, + emitsInOrder([ + _hasKind(EventKind.kPausePostRequest), + for (final (:bp, breakpointMarker: _, file: _) in breakpoints) ...[ + if (bp != null) _hasKind(EventKind.kBreakpointRemoved), + _hasKind(EventKind.kBreakpointAdded), + ], + _hasKind(EventKind.kResume), + ]), + ); final waitForPausePost = expectLater( stream, - emitsThrough(_hasKind(EventKind.kPausePostRequest)), + emits(_hasKind(EventKind.kPausePostRequest)), ); // Initiate the hot reload by loading the sources into the page. @@ -162,6 +173,7 @@ void main() { } // The resume should complete hot reload and resume the program. await resume(); + await breakpointEvents; return newBreakpoints; } @@ -198,8 +210,13 @@ void main() { await subscription.cancel(); } - Future waitForBreakpoint() => - expectLater(stream, emitsThrough(_hasKind(EventKind.kPauseBreakpoint))); + Future waitForBreakpoint({bool resumeFirst = false}) => expectLater( + stream, + emitsInOrder([ + if (resumeFirst) _hasKind(EventKind.kResume), + _hasKind(EventKind.kPauseBreakpoint), + ]), + ); test('empty hot reload keeps breakpoints', () async { final genString = 'main gen0'; @@ -384,7 +401,7 @@ void main() { // Should break at `callLog`. await breakpointFuture; - breakpointFuture = waitForBreakpoint(); + breakpointFuture = waitForBreakpoint(resumeFirst: true); await resume(); // Should break at `libValue`. @@ -454,7 +471,7 @@ void main() { // Should break at `callLog`. await breakpointFuture; - breakpointFuture = waitForBreakpoint(); + breakpointFuture = waitForBreakpoint(resumeFirst: true); await resume(); // Should break at the breakpoint in the last file. diff --git a/dwds/test/hot_restart_breakpoints_test.dart b/dwds/test/hot_restart_breakpoints_test.dart index 1a83b5f67..83e872247 100644 --- a/dwds/test/hot_restart_breakpoints_test.dart +++ b/dwds/test/hot_restart_breakpoints_test.dart @@ -93,7 +93,7 @@ void main() { ); final breakpointAdded = expectLater( stream, - emitsThrough(_hasKind(EventKind.kBreakpointAdded)), + emits(_hasKind(EventKind.kBreakpointAdded)), ); final breakpoint = await client.addBreakpointWithScriptUri( isolateId, @@ -134,17 +134,29 @@ void main() { } Future hotRestartAndHandlePausePost( - List<({String file, String breakpointMarker})> breakpoints, + List<({String file, String breakpointMarker, bool exists})> breakpoints, ) async { - final eventsDone = expectLater( + final isolateEvents = expectLater( client.onIsolateEvent, - emitsThrough( - emitsInOrder([ - _hasKind(EventKind.kIsolateExit), - _hasKind(EventKind.kIsolateStart), - _hasKind(EventKind.kIsolateRunnable), - ]), - ), + emitsInOrder([ + _hasKind(EventKind.kIsolateExit), + _hasKind(EventKind.kIsolateStart), + _hasKind(EventKind.kIsolateRunnable), + ]), + ); + final breakpointEvents = expectLater( + stream, + emitsInOrder([ + for (final (:exists, breakpointMarker: _, file: _) + in breakpoints) ...[ + if (exists) _hasKind(EventKind.kBreakpointRemoved), + ], + _hasKind(EventKind.kResume), + _hasKind(EventKind.kPausePostRequest), + for (final _ in breakpoints) ...[ + _hasKind(EventKind.kBreakpointAdded), + ], + ]), ); final waitForPausePost = expectLater( @@ -158,7 +170,7 @@ void main() { const TypeMatcher(), ); - await eventsDone; + await isolateEvents; // DWDS defers running main after a hot restart until the client (e.g. // DAP) resumes. Client should listen for this event, remove breakpoints @@ -170,10 +182,11 @@ void main() { final vm = await client.getVM(); final isolate = await service.getIsolate(vm.isolates!.first.id!); expect(isolate.breakpoints, isEmpty); - for (final (:breakpointMarker, :file) in breakpoints) { + for (final (exists: _, :breakpointMarker, :file) in breakpoints) { await addBreakpoint(file: file, breakpointMarker: breakpointMarker); } await resume(); + await breakpointEvents; } Future waitForBreakpoint() => @@ -189,7 +202,7 @@ void main() { await context.recompile(fullRestart: false); await hotRestartAndHandlePausePost([ - (file: mainFile, breakpointMarker: callLogMarker), + (exists: true, file: mainFile, breakpointMarker: callLogMarker), ]); // Should break at `callLog`. @@ -210,7 +223,7 @@ void main() { final breakpointFuture = waitForBreakpoint(); await hotRestartAndHandlePausePost([ - (file: mainFile, breakpointMarker: callLogMarker), + (exists: true, file: mainFile, breakpointMarker: callLogMarker), ]); // Should break at `callLog`. @@ -236,7 +249,7 @@ void main() { var breakpointFuture = waitForBreakpoint(); await hotRestartAndHandlePausePost([ - (file: mainFile, breakpointMarker: callLogMarker), + (exists: true, file: mainFile, breakpointMarker: callLogMarker), ]); // Should break at `callLog`. @@ -255,7 +268,7 @@ void main() { breakpointFuture = waitForBreakpoint(); await hotRestartAndHandlePausePost([ - (file: mainFile, breakpointMarker: callLogMarker), + (exists: true, file: mainFile, breakpointMarker: callLogMarker), ]); // Should break at `callLog`. @@ -298,8 +311,8 @@ void main() { var breakpointFuture = waitForBreakpoint(); await hotRestartAndHandlePausePost([ - (file: mainFile, breakpointMarker: callLogMarker), - (file: libFile, breakpointMarker: libValueMarker), + (exists: true, file: mainFile, breakpointMarker: callLogMarker), + (exists: false, file: libFile, breakpointMarker: libValueMarker), ]); // Should break at `callLog`. @@ -353,8 +366,12 @@ void main() { var breakpointFuture = waitForBreakpoint(); await hotRestartAndHandlePausePost([ - (file: mainFile, breakpointMarker: callLogMarker), - (file: 'library$numFiles.dart', breakpointMarker: 'libValue$numFiles'), + (exists: true, file: mainFile, breakpointMarker: callLogMarker), + ( + exists: false, + file: 'library$numFiles.dart', + breakpointMarker: 'libValue$numFiles', + ), ]); final newGenLog = 'library$numFiles gen1'; From 59fe863679ddb78e5dd3ba0a34c4d3cbdcd6659f Mon Sep 17 00:00:00 2001 From: Ben Konyi Date: Thu, 9 Oct 2025 15:02:10 -0400 Subject: [PATCH 2/3] [ DWDS ] Expose `dtdUri` via `DebugConnection` (#2694) This is needed to access the DTD instance spawned by DDS. --- dwds/CHANGELOG.md | 3 ++- dwds/lib/src/connections/debug_connection.dart | 3 +++ dwds/lib/src/handlers/dev_handler.dart | 1 + dwds/lib/src/services/app_debug_services.dart | 11 +++++++++++ dwds/lib/src/version.dart | 2 +- dwds/pubspec.yaml | 14 +++++++------- dwds/test/dds_port_test.dart | 2 ++ 7 files changed, 27 insertions(+), 9 deletions(-) diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index e1bc5c507..0fd5b5ebf 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,8 +1,9 @@ -## 25.1.0+1-wip +## 25.1.0+1 - Bump SDK constraint to ^3.10.0 - Added 'scriptUri' parameter to compileExpressionToJs - Fix an issue in `reloadSources` where a `PauseInterrupted` event was sent. - [#61560](https://github.com/dart-lang/sdk/issues/61560) +- Expose `dtdUri` via `DebugConnection`. ## 25.1.0 diff --git a/dwds/lib/src/connections/debug_connection.dart b/dwds/lib/src/connections/debug_connection.dart index 6a84cef89..9de1a79cf 100644 --- a/dwds/lib/src/connections/debug_connection.dart +++ b/dwds/lib/src/connections/debug_connection.dart @@ -41,6 +41,9 @@ class DebugConnection { /// The endpoint of the Dart DevTools instance. String? get devToolsUri => _appDebugServices.devToolsUri?.toString(); + /// The endpoint of the Dart Tooling Daemon (DTD). + String? get dtdUri => _appDebugServices.dtdUri?.toString(); + /// A client of the Dart VM Service with DWDS specific extensions. VmService get vmService => _appDebugServices.dwdsVmClient.client; diff --git a/dwds/lib/src/handlers/dev_handler.dart b/dwds/lib/src/handlers/dev_handler.dart index ec669f47a..84f4a0784 100644 --- a/dwds/lib/src/handlers/dev_handler.dart +++ b/dwds/lib/src/handlers/dev_handler.dart @@ -869,6 +869,7 @@ class DevHandler { dwdsStats, dds?.wsUri, dds?.devToolsUri, + dds?.dtdUri, ); final encodedUri = await debugService.encodedUri; _logger.info('Debug service listening on $encodedUri\n'); diff --git a/dwds/lib/src/services/app_debug_services.dart b/dwds/lib/src/services/app_debug_services.dart index 474386f8e..fe3a2e04f 100644 --- a/dwds/lib/src/services/app_debug_services.dart +++ b/dwds/lib/src/services/app_debug_services.dart @@ -14,6 +14,7 @@ abstract class AppDebugServices { DwdsStats? get dwdsStats; Uri? get ddsUri; Uri? get devToolsUri; + Uri? get dtdUri; String? get connectedInstanceId; set connectedInstanceId(String? id); Future close(); @@ -27,6 +28,7 @@ class ChromeAppDebugServices implements AppDebugServices { final DwdsStats _dwdsStats; final Uri? _ddsUri; final Uri? _devToolsUri; + final Uri? _dtdUri; Future? _closed; String? _connectedInstanceId; @@ -36,6 +38,7 @@ class ChromeAppDebugServices implements AppDebugServices { this._dwdsStats, this._ddsUri, this._devToolsUri, + this._dtdUri, ); @override @@ -53,6 +56,9 @@ class ChromeAppDebugServices implements AppDebugServices { @override Uri? get devToolsUri => _devToolsUri; + @override + Uri? get dtdUri => _dtdUri; + @override String? get connectedInstanceId => _connectedInstanceId; @@ -86,12 +92,17 @@ class WebSocketAppDebugServices implements AppDebugServices { // WebSocket-only service - Chrome/DDS features not available @override DwdsStats? get dwdsStats => null; + @override // TODO(bkonyi): DDS should still start in WebSocket mode. Uri? get ddsUri => null; + @override Uri? get devToolsUri => null; + @override + Uri? get dtdUri => null; + @override ProxyService get proxyService => _debugService.webSocketProxyService; diff --git a/dwds/lib/src/version.dart b/dwds/lib/src/version.dart index 8e75a061a..e12621006 100644 --- a/dwds/lib/src/version.dart +++ b/dwds/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '25.1.0+1-wip'; +const packageVersion = '25.1.0+1'; diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 331dcb869..b418e0908 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -1,6 +1,6 @@ name: dwds # Every time this changes you need to run `dart run build_runner build`. -version: 25.1.0+1-wip +version: 25.1.0+1 description: >- A service that proxies between the Chrome debug protocol and the Dart VM @@ -15,8 +15,8 @@ dependencies: built_value: ^8.3.0 collection: ^1.15.0 crypto: ^3.0.2 - dds: '>=4.2.5 <6.0.0' - file: '>=6.1.4 <8.0.0' + dds: ">=4.2.5 <6.0.0" + file: ">=6.1.4 <8.0.0" http: ^1.0.0 http_multi_server: ^3.2.0 logging: ^1.0.2 @@ -29,15 +29,15 @@ dependencies: shelf_packages_handler: ^3.0.0 shelf_proxy: ^1.0.4 shelf_static: ^1.1.0 - shelf_web_socket: '>=2.0.0 <4.0.0' + shelf_web_socket: ">=2.0.0 <4.0.0" source_maps: ^0.10.10 stack_trace: ^1.10.0 stream_channel: ^2.1.2 sse: ^4.1.2 uuid: ^4.0.0 - vm_service: '>=14.2.4 <16.0.0' + vm_service: ">=14.2.4 <16.0.0" vm_service_interface: ^2.0.1 - web_socket_channel: '>=2.2.0 <4.0.0' + web_socket_channel: ">=2.2.0 <4.0.0" web: ^1.1.0 webkit_inspection_protocol: ^1.0.1 @@ -55,7 +55,7 @@ dev_dependencies: frontend_server_common: path: ../frontend_server_common io: ^1.0.5 - js: '>=0.6.4 <0.8.0' + js: ">=0.6.4 <0.8.0" pubspec_parse: ^1.2.0 puppeteer: ^3.1.1 test: ^1.21.6 diff --git a/dwds/test/dds_port_test.dart b/dwds/test/dds_port_test.dart index 5d03b85e9..7484c8659 100644 --- a/dwds/test/dds_port_test.dart +++ b/dwds/test/dds_port_test.dart @@ -42,6 +42,7 @@ void main() { ), ); expect(Uri.parse(context.debugConnection.ddsUri!).port, expectedPort); + expect(context.debugConnection.dtdUri, isNotNull); }); test('DWDS starts DDS with a specified port', () async { @@ -58,5 +59,6 @@ void main() { ), ); expect(Uri.parse(context.debugConnection.ddsUri!).port, expectedPort); + expect(context.debugConnection.dtdUri, isNotNull); }); } From 3af549090742ec9e9fc9047c67b999d812e173f2 Mon Sep 17 00:00:00 2001 From: Ben Konyi Date: Thu, 9 Oct 2025 15:33:02 -0400 Subject: [PATCH 3/3] Revert pubspec formatting --- dwds/pubspec.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index b418e0908..73aca16d6 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -15,8 +15,8 @@ dependencies: built_value: ^8.3.0 collection: ^1.15.0 crypto: ^3.0.2 - dds: ">=4.2.5 <6.0.0" - file: ">=6.1.4 <8.0.0" + dds: '>=4.2.5 <6.0.0' + file: '>=6.1.4 <8.0.0' http: ^1.0.0 http_multi_server: ^3.2.0 logging: ^1.0.2 @@ -29,15 +29,15 @@ dependencies: shelf_packages_handler: ^3.0.0 shelf_proxy: ^1.0.4 shelf_static: ^1.1.0 - shelf_web_socket: ">=2.0.0 <4.0.0" + shelf_web_socket: '>=2.0.0 <4.0.0' source_maps: ^0.10.10 stack_trace: ^1.10.0 stream_channel: ^2.1.2 sse: ^4.1.2 uuid: ^4.0.0 - vm_service: ">=14.2.4 <16.0.0" + vm_service: '>=14.2.4 <16.0.0' vm_service_interface: ^2.0.1 - web_socket_channel: ">=2.2.0 <4.0.0" + web_socket_channel: '>=2.2.0 <4.0.0' web: ^1.1.0 webkit_inspection_protocol: ^1.0.1 @@ -55,7 +55,7 @@ dev_dependencies: frontend_server_common: path: ../frontend_server_common io: ^1.0.5 - js: ">=0.6.4 <0.8.0" + js: '>=0.6.4 <0.8.0' pubspec_parse: ^1.2.0 puppeteer: ^3.1.1 test: ^1.21.6