OLD | NEW |
---|---|
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of service; | 5 part of service; |
6 | 6 |
7 /// Helper function for canceling a Future<StreamSubscription>. | 7 /// Helper function for canceling a Future<StreamSubscription>. |
8 Future cancelFutureSubscription( | 8 Future cancelFutureSubscription( |
9 Future<StreamSubscription> subscriptionFuture) async { | 9 Future<StreamSubscription> subscriptionFuture) async { |
10 if (subscriptionFuture != null) { | 10 if (subscriptionFuture != null) { |
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1726 static const kConnectionClosed = 'ConnectionClosed'; | 1726 static const kConnectionClosed = 'ConnectionClosed'; |
1727 static const kLogging = '_Logging'; | 1727 static const kLogging = '_Logging'; |
1728 | 1728 |
1729 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); | 1729 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); |
1730 | 1730 |
1731 ServiceEvent.connectionClosed(this.reason) : super._empty(null) { | 1731 ServiceEvent.connectionClosed(this.reason) : super._empty(null) { |
1732 kind = kConnectionClosed; | 1732 kind = kConnectionClosed; |
1733 } | 1733 } |
1734 | 1734 |
1735 @observable String kind; | 1735 @observable String kind; |
1736 @observable DateTime timestamp; | |
1736 @observable Breakpoint breakpoint; | 1737 @observable Breakpoint breakpoint; |
1737 @observable Frame topFrame; | 1738 @observable Frame topFrame; |
1738 @observable Instance exception; | 1739 @observable Instance exception; |
1739 @observable Instance asyncContinuation; | 1740 @observable Instance asyncContinuation; |
1740 @observable bool atAsyncJump; | 1741 @observable bool atAsyncJump; |
1741 @observable ServiceObject inspectee; | 1742 @observable ServiceObject inspectee; |
1742 @observable ByteData data; | 1743 @observable ByteData data; |
1743 @observable int count; | 1744 @observable int count; |
1744 @observable String reason; | 1745 @observable String reason; |
1745 @observable String exceptions; | 1746 @observable String exceptions; |
1746 @observable String bytesAsString; | 1747 @observable String bytesAsString; |
1747 @observable Map logRecord; | 1748 @observable Map logRecord; |
1749 | |
1748 int chunkIndex, chunkCount, nodeCount; | 1750 int chunkIndex, chunkCount, nodeCount; |
1749 | 1751 |
1750 @observable bool get isPauseEvent { | 1752 @observable bool get isPauseEvent { |
1751 return (kind == kPauseStart || | 1753 return (kind == kPauseStart || |
1752 kind == kPauseExit || | 1754 kind == kPauseExit || |
1753 kind == kPauseBreakpoint || | 1755 kind == kPauseBreakpoint || |
1754 kind == kPauseInterrupted || | 1756 kind == kPauseInterrupted || |
1755 kind == kPauseException); | 1757 kind == kPauseException); |
1756 } | 1758 } |
1757 | 1759 |
1758 void _update(ObservableMap map, bool mapIsRef) { | 1760 void _update(ObservableMap map, bool mapIsRef) { |
1759 _loaded = true; | 1761 _loaded = true; |
1760 _upgradeCollection(map, owner); | 1762 _upgradeCollection(map, owner); |
1761 assert(map['isolate'] == null || owner == map['isolate']); | 1763 assert(map['isolate'] == null || owner == map['isolate']); |
1764 timestamp = | |
1765 new DateTime.fromMillisecondsSinceEpoch(map['timestamp'].toInt()); | |
turnidge
2015/08/25 18:25:31
Here we are doing toInt(), but above for 'startTim
Cutch
2015/08/25 21:54:58
We should be calling AddPropertyTimeMillis in C++
| |
1762 kind = map['kind']; | 1766 kind = map['kind']; |
1763 notifyPropertyChange(#isPauseEvent, 0, 1); | 1767 notifyPropertyChange(#isPauseEvent, 0, 1); |
1764 name = 'ServiceEvent $kind'; | 1768 name = 'ServiceEvent $kind'; |
1765 vmName = name; | 1769 vmName = name; |
1766 if (map['breakpoint'] != null) { | 1770 if (map['breakpoint'] != null) { |
1767 breakpoint = map['breakpoint']; | 1771 breakpoint = map['breakpoint']; |
1768 } | 1772 } |
1769 // TODO(turnidge): Expose the full list of breakpoints. For now | 1773 // TODO(turnidge): Expose the full list of breakpoints. For now |
1770 // we just pretend like there is only one active breakpoint. | 1774 // we just pretend like there is only one active breakpoint. |
1771 if (map['pauseBreakpoints'] != null) { | 1775 if (map['pauseBreakpoints'] != null) { |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3796 var v = list[i]; | 3800 var v = list[i]; |
3797 if ((v is ObservableMap) && _isServiceMap(v)) { | 3801 if ((v is ObservableMap) && _isServiceMap(v)) { |
3798 list[i] = owner.getFromMap(v); | 3802 list[i] = owner.getFromMap(v); |
3799 } else if (v is ObservableList) { | 3803 } else if (v is ObservableList) { |
3800 _upgradeObservableList(v, owner); | 3804 _upgradeObservableList(v, owner); |
3801 } else if (v is ObservableMap) { | 3805 } else if (v is ObservableMap) { |
3802 _upgradeObservableMap(v, owner); | 3806 _upgradeObservableMap(v, owner); |
3803 } | 3807 } |
3804 } | 3808 } |
3805 } | 3809 } |
OLD | NEW |