Skip to content

Commit 453f001

Browse files
iinozemtsevCommit Queue
authored andcommitted
Allow injecting OperationPerformanceImpl into linkLibraries2
Bug: b/430976289 Change-Id: I6be91f7500906c9a7cbba32538ef93042a31f4b2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/440222 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Ivan Inozemtsev <[email protected]>
1 parent f5c40b9 commit 453f001

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/analyzer/lib/src/dart/micro/resolve_file.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,13 @@ class FileResolver {
447447
/// partially resynthesized data, and so prepare for loading linked summaries
448448
/// from bytes, which will be done by [getErrors2]. It is OK for it to
449449
/// spend some more time on this.
450-
Future<void> linkLibraries2({required String path}) async {
450+
Future<void> linkLibraries2({
451+
required String path,
452+
OperationPerformanceImpl? performance,
453+
}) async {
451454
_throwIfNotAbsoluteNormalizedPath(path);
452455

453-
var performance = OperationPerformanceImpl('<unused>');
456+
performance ??= OperationPerformanceImpl('<unused>');
454457

455458
var fileContext = getFileContext(path: path, performance: performance);
456459
var file = fileContext.file;

0 commit comments

Comments
 (0)