dart /
tools /
0fc7aac96ff34d67e3026e0405c1752939ec5591 Use VMScriptRef to identify VM scripts, not URI (dart-lang/coverage#216)
Previously, coverage collection assumed that a script could be uniquely
identified by URI, which is not a valid assumption. For example, when a
part is loaded via two libraries, both of which are loaded by an
isolate, the VM will track these are two scripts that map to the same
URI.
During collection, we now track each script by its (unique)
VMScriptRef. This ensures we lookup the correct script when computing
the affected line for each hit token. The hitmap remains URI based,
since in the end, we want a single, unified set of line->hitCount
mappings per script.
Fixes dart-lang/coveragedart-lang/coverage#194
1 file changed
tree: 482be07b894b97f189c41b2b2aae152ac417479f
- pkgs/