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 // 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 2107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2118 static const kBreakpointAdded = 'BreakpointAdded'; | 2118 static const kBreakpointAdded = 'BreakpointAdded'; |
2119 static const kBreakpointResolved = 'BreakpointResolved'; | 2119 static const kBreakpointResolved = 'BreakpointResolved'; |
2120 static const kBreakpointRemoved = 'BreakpointRemoved'; | 2120 static const kBreakpointRemoved = 'BreakpointRemoved'; |
2121 static const kGraph = '_Graph'; | 2121 static const kGraph = '_Graph'; |
2122 static const kGC = 'GC'; | 2122 static const kGC = 'GC'; |
2123 static const kInspect = 'Inspect'; | 2123 static const kInspect = 'Inspect'; |
2124 static const kDebuggerSettingsUpdate = '_DebuggerSettingsUpdate'; | 2124 static const kDebuggerSettingsUpdate = '_DebuggerSettingsUpdate'; |
2125 static const kConnectionClosed = 'ConnectionClosed'; | 2125 static const kConnectionClosed = 'ConnectionClosed'; |
2126 static const kLogging = '_Logging'; | 2126 static const kLogging = '_Logging'; |
2127 static const kExtension = 'Extension'; | 2127 static const kExtension = 'Extension'; |
| 2128 static const kEditor = '_Editor'; |
2128 | 2129 |
2129 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); | 2130 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); |
2130 | 2131 |
2131 ServiceEvent.connectionClosed(this.reason) : super._empty(null) { | 2132 ServiceEvent.connectionClosed(this.reason) : super._empty(null) { |
2132 kind = kConnectionClosed; | 2133 kind = kConnectionClosed; |
2133 } | 2134 } |
2134 | 2135 |
2135 String kind; | 2136 String kind; |
2136 DateTime timestamp; | 2137 DateTime timestamp; |
2137 List<M.Breakpoint> pauseBreakpoints; | 2138 List<M.Breakpoint> pauseBreakpoints; |
2138 Breakpoint breakpoint; | 2139 Breakpoint breakpoint; |
2139 Frame topFrame; | 2140 Frame topFrame; |
2140 DartError error; | 2141 DartError error; |
2141 String extensionRPC; | 2142 String extensionRPC; |
2142 Instance exception; | 2143 Instance exception; |
2143 DartError reloadError; | 2144 DartError reloadError; |
2144 bool atAsyncSuspension; | 2145 bool atAsyncSuspension; |
2145 Instance inspectee; | 2146 Instance inspectee; |
2146 ByteData data; | 2147 ByteData data; |
2147 int count; | 2148 int count; |
2148 String reason; | 2149 String reason; |
2149 String exceptions; | 2150 String exceptions; |
2150 String bytesAsString; | 2151 String bytesAsString; |
2151 Map logRecord; | 2152 Map logRecord; |
2152 String extensionKind; | 2153 String extensionKind; |
2153 Map extensionData; | 2154 Map extensionData; |
2154 List timelineEvents; | 2155 List timelineEvents; |
2155 String spawnToken; | 2156 String spawnToken; |
2156 String spawnError; | 2157 String spawnError; |
| 2158 String editor; |
| 2159 ServiceObject object; |
2157 | 2160 |
2158 int chunkIndex, chunkCount, nodeCount; | 2161 int chunkIndex, chunkCount, nodeCount; |
2159 | 2162 |
2160 bool get isPauseEvent { | 2163 bool get isPauseEvent { |
2161 return (kind == kPauseStart || | 2164 return (kind == kPauseStart || |
2162 kind == kPauseExit || | 2165 kind == kPauseExit || |
2163 kind == kPauseBreakpoint || | 2166 kind == kPauseBreakpoint || |
2164 kind == kPauseInterrupted || | 2167 kind == kPauseInterrupted || |
2165 kind == kPauseException || | 2168 kind == kPauseException || |
2166 kind == kPausePostRequest || | 2169 kind == kPausePostRequest || |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2237 } | 2240 } |
2238 if (map['timelineEvents'] != null) { | 2241 if (map['timelineEvents'] != null) { |
2239 timelineEvents = map['timelineEvents']; | 2242 timelineEvents = map['timelineEvents']; |
2240 } | 2243 } |
2241 if (map['spawnToken'] != null) { | 2244 if (map['spawnToken'] != null) { |
2242 spawnToken = map['spawnToken']; | 2245 spawnToken = map['spawnToken']; |
2243 } | 2246 } |
2244 if (map['spawnError'] != null) { | 2247 if (map['spawnError'] != null) { |
2245 spawnError = map['spawnError']; | 2248 spawnError = map['spawnError']; |
2246 } | 2249 } |
| 2250 if (map['editor'] != null) { |
| 2251 editor = map['editor']; |
| 2252 } |
| 2253 if (map['object'] != null) { |
| 2254 object = map['object']; |
| 2255 } |
2247 } | 2256 } |
2248 | 2257 |
2249 String toString() { | 2258 String toString() { |
2250 var ownerName = owner.id != null ? owner.id.toString() : owner.name; | 2259 var ownerName = owner.id != null ? owner.id.toString() : owner.name; |
2251 if (data == null) { | 2260 if (data == null) { |
2252 return "ServiceEvent(owner='${ownerName}', kind='${kind}', " | 2261 return "ServiceEvent(owner='${ownerName}', kind='${kind}', " |
2253 "time=${timestamp})"; | 2262 "time=${timestamp})"; |
2254 } else { | 2263 } else { |
2255 return "ServiceEvent(owner='${ownerName}', kind='${kind}', " | 2264 return "ServiceEvent(owner='${ownerName}', kind='${kind}', " |
2256 "data.lengthInBytes=${data.lengthInBytes}, time=${timestamp})"; | 2265 "data.lengthInBytes=${data.lengthInBytes}, time=${timestamp})"; |
(...skipping 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4648 var v = list[i]; | 4657 var v = list[i]; |
4649 if ((v is Map) && _isServiceMap(v)) { | 4658 if ((v is Map) && _isServiceMap(v)) { |
4650 list[i] = owner.getFromMap(v); | 4659 list[i] = owner.getFromMap(v); |
4651 } else if (v is List) { | 4660 } else if (v is List) { |
4652 _upgradeList(v, owner); | 4661 _upgradeList(v, owner); |
4653 } else if (v is Map) { | 4662 } else if (v is Map) { |
4654 _upgradeMap(v, owner); | 4663 _upgradeMap(v, owner); |
4655 } | 4664 } |
4656 } | 4665 } |
4657 } | 4666 } |
OLD | NEW |