Skip to content

Commit

Permalink
[dart2wasm] Allow package:ui/* to import dart:_wasm
Browse files Browse the repository at this point in the history
Change-Id: I4fc17b992db272d6154a7c58fc1f4229c5368ee4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325620
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
  • Loading branch information
mkustermann authored and Commit Queue committed Sep 14, 2023
1 parent 07c5092 commit 8637cbe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/dart2wasm/lib/target.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ class WasmTarget extends Target {
bool allowPlatformPrivateLibraryAccess(Uri importer, Uri imported) =>
super.allowPlatformPrivateLibraryAccess(importer, imported) ||
importer.path.contains('tests/web/wasm') ||
importer.isScheme('package') && importer.path == 'js/js.dart';
importer.isScheme('package') &&
(importer.path == 'js/js.dart' ||
importer.path.startsWith('ui/') &&
imported.toString() == 'dart:_wasm');

void _patchHostEndian(CoreTypes coreTypes) {
// Fix Endian.host to be a const field equal to Endian.little instead of
Expand Down

0 comments on commit 8637cbe

Please sign in to comment.