Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Addressed CR comments
  • Loading branch information
Anna Gringauze committed Jan 16, 2024
commit 2e7ebfe48d712017bbab856288814e221e862bea
1 change: 0 additions & 1 deletion dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
- Add `FrontendServerLegacyStrategyProvider` and update bootstrap generation logic for `LegacyStrategy` - [#2285](https://github.com/dart-lang/webdev/pull/2285)
- Tolerate failures to detect a Dart execution context. - [#2286](https://github.com/dart-lang/webdev/pull/2286)
- Fix a null cast error when debugging a `Class` from VS Code. - [#2303](https://github.com/dart-lang/webdev/pull/2303)

- Update `package:vm_service` constraint to `^14.0.0`. - [#2307](https://github.com/dart-lang/webdev/pull/2307)
- Update `package:vm_service_interface` constraint to `1.0.1`. - [#2307](https://github.com/dart-lang/webdev/pull/2307)

Expand Down
13 changes: 7 additions & 6 deletions dwds/web/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,13 @@ external String? get dartWorkspaceName;

bool get _isChromium => window.navigator.vendor.contains('Google');

bool? get _isInternalBuild =>
windowContext['\$isInternalBuild'].dartify() as bool?;
bool? get _isInternalBuild => _toBool(windowContext['\$isInternalBuild']);

bool? get _isFlutterApp => windowContext['\$isFlutterApp'].dartify() as bool?;
bool? get _isFlutterApp => _toBool(windowContext['\$isFlutterApp']);

String? get _appId => windowContext['\$dartAppId'].dartify() as String?;
String? get _appId => _toString(windowContext['\$dartAppId']);

String? get _extensionUrl =>
windowContext['\$dartExtensionUri'].dartify() as String?;
String? get _extensionUrl => _toString(windowContext['\$dartExtensionUri']);

String? get _authUrl {
final extensionUrl = _extensionUrl;
Expand All @@ -396,3 +394,6 @@ String? get _authUrl {
return authUrl.toString();
}
}

bool? _toBool(JSAny? object) => (object as JSBoolean?)?.toDart;
String? _toString(JSAny? object) => (object as JSString?)?.toDart;
13 changes: 6 additions & 7 deletions dwds/web/reloader/require_restarter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ class RequireRestarter implements Restarter {
'ext.flutter.disassemble'.toJS,
)
.dartify() as bool) {
await (developer
.callMethod(
'invokeExtension'.toJS,
'ext.flutter.disassemble'.toJS,
'{}'.toJS,
)
.dartify() as Future<Object?>);
await (developer.callMethod(
'invokeExtension'.toJS,
'ext.flutter.disassemble'.toJS,
'{}'.toJS,
) as JSPromise)
.toDart;
}

final newDigests = await _getDigests();
Expand Down