| Index: runtime/observatory/lib/src/elements/isolate/shared_summary.dart
|
| diff --git a/runtime/observatory/lib/src/elements/isolate/shared_summary.dart b/runtime/observatory/lib/src/elements/isolate/shared_summary.dart
|
| index 1bf29147bd2847f94a575b5ad6a8cced0a9c1283..6bba9ed652808466755ca81103a62d61b74c3865 100644
|
| --- a/runtime/observatory/lib/src/elements/isolate/shared_summary.dart
|
| +++ b/runtime/observatory/lib/src/elements/isolate/shared_summary.dart
|
| @@ -13,7 +13,7 @@ import 'package:observatory/src/elements/isolate/counter_chart.dart';
|
|
|
| class IsolateSharedSummaryElement extends HtmlElement implements Renderable {
|
| static const tag =
|
| - const Tag<IsolateSharedSummaryElement>('isolate-shared-summary-wrapped',
|
| + const Tag<IsolateSharedSummaryElement>('isolate-shared-summary',
|
| dependencies: const [
|
| IsolateCounterChartElement.tag
|
| ]);
|
| @@ -24,13 +24,18 @@ class IsolateSharedSummaryElement extends HtmlElement implements Renderable {
|
| _r.onRendered;
|
|
|
| M.Isolate _isolate;
|
| + M.EventRepository _events;
|
| + StreamSubscription _isolateSubscription;
|
|
|
| factory IsolateSharedSummaryElement(M.Isolate isolate,
|
| + M.EventRepository events,
|
| {RenderingQueue queue}) {
|
| assert(isolate != null);
|
| + assert(events != null);
|
| IsolateSharedSummaryElement e = document.createElement(tag.name);
|
| e._r = new RenderingScheduler(e, queue: queue);
|
| e._isolate = isolate;
|
| + e._events = events;
|
| return e;
|
| }
|
|
|
| @@ -40,6 +45,7 @@ class IsolateSharedSummaryElement extends HtmlElement implements Renderable {
|
| void attached() {
|
| super.attached();
|
| _r.enable();
|
| + _isolateSubscription = _events.onIsolateEvent.listen(_eventListener);
|
| }
|
|
|
| @override
|
| @@ -47,6 +53,7 @@ class IsolateSharedSummaryElement extends HtmlElement implements Renderable {
|
| super.detached();
|
| children = [];
|
| _r.disable(notify: true);
|
| + _isolateSubscription.cancel();
|
| }
|
|
|
| void render() {
|
| @@ -158,4 +165,11 @@ class IsolateSharedSummaryElement extends HtmlElement implements Renderable {
|
| ];
|
| }
|
| }
|
| +
|
| + void _eventListener(e) {
|
| + if (e.isolate.id == _isolate.id) {
|
| + _isolate = e.isolate;
|
| + _r.dirty();
|
| + }
|
| + }
|
| }
|
|
|