| Index: runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
|
| diff --git a/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart b/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
|
| index 2117d8319cf75dbb8b2fba4a073aa233bb716832..babca7d8408357746ba2d8bc3465c55bcea38bb3 100644
|
| --- a/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
|
| +++ b/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
|
| @@ -7,11 +7,11 @@ part of observatory;
|
| /// State for a running isolate.
|
| class Isolate extends Observable {
|
| @observable Profile profile;
|
| + @observable final Map<String, Script> scripts =
|
| + toObservable(new Map<String, Script>());
|
| @observable final List<Code> codes = new List<Code>();
|
| @observable String id;
|
| @observable String name;
|
| - @observable final Map<String, ScriptSource> scripts =
|
| - toObservable(new Map<String, ScriptSource>());
|
|
|
| Isolate(this.id, this.name);
|
|
|
| @@ -39,4 +39,17 @@ class Isolate extends Observable {
|
| codes[i].resetTicks();
|
| }
|
| }
|
| +
|
| + void updateCoverage(List coverages) {
|
| + for (var coverage in coverages) {
|
| + var id = coverage['script']['id'];
|
| + var script = scripts[id];
|
| + if (script == null) {
|
| + script = new Script.fromMap(coverage['script']);
|
| + scripts[id] = script;
|
| + }
|
| + assert(script != null);
|
| + script._processCoverageHits(coverage['hits']);
|
| + }
|
| + }
|
| }
|
|
|