Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: runtime/observatory/lib/src/service/object.dart

Issue 1756393002: Fix some service protocol isolate lifecycle races (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/observatory/lib/src/elements/isolate_summary.html ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Some value smaller than the object ring, so requesting a large array 7 // Some value smaller than the object ring, so requesting a large array
8 // doesn't result in an expired ref because the elements lapped it in the 8 // doesn't result in an expired ref because the elements lapped it in the
9 // object ring. 9 // object ring.
10 const int kDefaultFieldLimit = 100; 10 const int kDefaultFieldLimit = 100;
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 1505
1506 case ServiceEvent.kBreakpointRemoved: 1506 case ServiceEvent.kBreakpointRemoved:
1507 _removeBreakpoint(event.breakpoint); 1507 _removeBreakpoint(event.breakpoint);
1508 break; 1508 break;
1509 1509
1510 case ServiceEvent.kPauseStart: 1510 case ServiceEvent.kPauseStart:
1511 case ServiceEvent.kPauseExit: 1511 case ServiceEvent.kPauseExit:
1512 case ServiceEvent.kPauseBreakpoint: 1512 case ServiceEvent.kPauseBreakpoint:
1513 case ServiceEvent.kPauseInterrupted: 1513 case ServiceEvent.kPauseInterrupted:
1514 case ServiceEvent.kPauseException: 1514 case ServiceEvent.kPauseException:
1515 case ServiceEvent.kNone:
1515 case ServiceEvent.kResume: 1516 case ServiceEvent.kResume:
1516 assert((pauseEvent == null) || 1517 assert((pauseEvent == null) ||
1517 !event.timestamp.isBefore(pauseEvent.timestamp)); 1518 !event.timestamp.isBefore(pauseEvent.timestamp));
1518 pauseEvent = event; 1519 pauseEvent = event;
1519 _updateRunState(); 1520 _updateRunState();
1520 break; 1521 break;
1521 1522
1522 case ServiceEvent.kGraph: 1523 case ServiceEvent.kGraph:
1523 _loadHeapSnapshot(event); 1524 _loadHeapSnapshot(event);
1524 break; 1525 break;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 static const kIsolateStart = 'IsolateStart'; 1815 static const kIsolateStart = 'IsolateStart';
1815 static const kIsolateRunnable = 'IsolateRunnable'; 1816 static const kIsolateRunnable = 'IsolateRunnable';
1816 static const kIsolateExit = 'IsolateExit'; 1817 static const kIsolateExit = 'IsolateExit';
1817 static const kIsolateUpdate = 'IsolateUpdate'; 1818 static const kIsolateUpdate = 'IsolateUpdate';
1818 static const kServiceExtensionAdded = 'ServiceExtensionAdded'; 1819 static const kServiceExtensionAdded = 'ServiceExtensionAdded';
1819 static const kPauseStart = 'PauseStart'; 1820 static const kPauseStart = 'PauseStart';
1820 static const kPauseExit = 'PauseExit'; 1821 static const kPauseExit = 'PauseExit';
1821 static const kPauseBreakpoint = 'PauseBreakpoint'; 1822 static const kPauseBreakpoint = 'PauseBreakpoint';
1822 static const kPauseInterrupted = 'PauseInterrupted'; 1823 static const kPauseInterrupted = 'PauseInterrupted';
1823 static const kPauseException = 'PauseException'; 1824 static const kPauseException = 'PauseException';
1825 static const kNone = 'None';
1824 static const kResume = 'Resume'; 1826 static const kResume = 'Resume';
1825 static const kBreakpointAdded = 'BreakpointAdded'; 1827 static const kBreakpointAdded = 'BreakpointAdded';
1826 static const kBreakpointResolved = 'BreakpointResolved'; 1828 static const kBreakpointResolved = 'BreakpointResolved';
1827 static const kBreakpointRemoved = 'BreakpointRemoved'; 1829 static const kBreakpointRemoved = 'BreakpointRemoved';
1828 static const kGraph = '_Graph'; 1830 static const kGraph = '_Graph';
1829 static const kGC = 'GC'; 1831 static const kGC = 'GC';
1830 static const kInspect = 'Inspect'; 1832 static const kInspect = 'Inspect';
1831 static const kDebuggerSettingsUpdate = '_DebuggerSettingsUpdate'; 1833 static const kDebuggerSettingsUpdate = '_DebuggerSettingsUpdate';
1832 static const kConnectionClosed = 'ConnectionClosed'; 1834 static const kConnectionClosed = 'ConnectionClosed';
1833 static const kLogging = '_Logging'; 1835 static const kLogging = '_Logging';
(...skipping 22 matching lines...) Expand all
1856 @observable String extensionKind; 1858 @observable String extensionKind;
1857 @observable Map extensionData; 1859 @observable Map extensionData;
1858 1860
1859 int chunkIndex, chunkCount, nodeCount; 1861 int chunkIndex, chunkCount, nodeCount;
1860 1862
1861 @observable bool get isPauseEvent { 1863 @observable bool get isPauseEvent {
1862 return (kind == kPauseStart || 1864 return (kind == kPauseStart ||
1863 kind == kPauseExit || 1865 kind == kPauseExit ||
1864 kind == kPauseBreakpoint || 1866 kind == kPauseBreakpoint ||
1865 kind == kPauseInterrupted || 1867 kind == kPauseInterrupted ||
1866 kind == kPauseException); 1868 kind == kPauseException ||
1869 kind == kNone);
1867 } 1870 }
1868 1871
1869 void _update(ObservableMap map, bool mapIsRef) { 1872 void _update(ObservableMap map, bool mapIsRef) {
1870 _loaded = true; 1873 _loaded = true;
1871 _upgradeCollection(map, owner); 1874 _upgradeCollection(map, owner);
1872 1875
1873 assert(map['isolate'] == null || owner == map['isolate']); 1876 assert(map['isolate'] == null || owner == map['isolate']);
1874 timestamp = 1877 timestamp =
1875 new DateTime.fromMillisecondsSinceEpoch(map['timestamp']); 1878 new DateTime.fromMillisecondsSinceEpoch(map['timestamp']);
1876 kind = map['kind']; 1879 kind = map['kind'];
(...skipping 2134 matching lines...) Expand 10 before | Expand all | Expand 10 after
4011 var v = list[i]; 4014 var v = list[i];
4012 if ((v is ObservableMap) && _isServiceMap(v)) { 4015 if ((v is ObservableMap) && _isServiceMap(v)) {
4013 list[i] = owner.getFromMap(v); 4016 list[i] = owner.getFromMap(v);
4014 } else if (v is ObservableList) { 4017 } else if (v is ObservableList) {
4015 _upgradeObservableList(v, owner); 4018 _upgradeObservableList(v, owner);
4016 } else if (v is ObservableMap) { 4019 } else if (v is ObservableMap) {
4017 _upgradeObservableMap(v, owner); 4020 _upgradeObservableMap(v, owner);
4018 } 4021 }
4019 } 4022 }
4020 } 4023 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/isolate_summary.html ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698