Invalidate DDC library cache on trackLibraries

Since we cache everything on the first call to
`_computeLibraryMetadata`, if we haven't called `trackLibraries` for
some module before the first time we fetch libraries then it will never
be available.

Change-Id: If0c8d5835fb95e244797631d6452bd154eec30e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120936
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
This commit is contained in:
Nate Bosch 2019-10-31 19:46:10 +00:00 committed by commit-bot@chromium.org
parent 94e312f7a6
commit 0f7b67477f
2 changed files with 6 additions and 0 deletions

View file

@ -152,6 +152,9 @@ void trackLibraries(
JS('', '#.set(#, #)', _loadedSourceMaps, moduleName, sourceMap);
JS('', '#.set(#, #)', _loadedModules, moduleName, libraries);
JS('', '#.set(#, #)', _loadedPartMaps, moduleName, parts);
_libraries = null;
_libraryObjects = null;
_parts = null;
}
List<String> _libraries;

View file

@ -154,6 +154,9 @@ void trackLibraries(
JS('', '#.set(#, #)', _loadedSourceMaps, moduleName, sourceMap);
JS('', '#.set(#, #)', _loadedModules, moduleName, libraries);
JS('', '#.set(#, #)', _loadedPartMaps, moduleName, parts);
_libraries = null;
_libraryObjects = null;
_parts = null;
}
List<String> _libraries;