Index: runtime/observatory/lib/src/service/object.dart |
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart |
index 18d29bf838d2fc9bc449a5c960b14712118ba2d1..ba9daaba1ef6b79623273337aba91246ad6533a6 100644 |
--- a/runtime/observatory/lib/src/service/object.dart |
+++ b/runtime/observatory/lib/src/service/object.dart |
@@ -22,14 +22,14 @@ Future cancelFutureSubscription( |
/// An RpcException represents an exceptional event that happened |
/// while invoking an rpc. |
-abstract class RpcException implements Exception { |
+abstract class RpcException implements Exception, M.BasicException { |
RpcException(this.message); |
String message; |
} |
/// A ServerRpcException represents an error returned by the VM. |
-class ServerRpcException extends RpcException { |
+class ServerRpcException extends RpcException implements M.RequestException { |
/// A list of well-known server error codes. |
static const kParseError = -32700; |
static const kInvalidRequest = -32600; |
@@ -70,13 +70,15 @@ class ServerRpcException extends RpcException { |
/// A NetworkRpcException is used to indicate that an rpc has |
/// been canceled due to network error. |
-class NetworkRpcException extends RpcException { |
+class NetworkRpcException extends RpcException |
+ implements M.ConnectionException { |
NetworkRpcException(String message) : super(message); |
String toString() => 'NetworkRpcException(${message})'; |
} |
-class MalformedResponseRpcException extends RpcException { |
+class MalformedResponseRpcException extends RpcException |
+ implements M.ResponseException { |
MalformedResponseRpcException(String message, this.response) |
: super(message); |
@@ -424,7 +426,8 @@ abstract class Location { |
} |
/// A [SourceLocation] represents a location or range in the source code. |
-class SourceLocation extends ServiceObject implements Location { |
+class SourceLocation extends ServiceObject implements Location, |
+ M.SourceLocation { |
Script script; |
int tokenPos; |
int endTokenPos; |
@@ -603,7 +606,7 @@ class _EventStreamState { |
} |
/// State for a VM being inspected. |
-abstract class VM extends ServiceObjectOwner { |
+abstract class VM extends ServiceObjectOwner implements M.VM { |
@reflectable VM get vm => this; |
@reflectable Isolate get isolate => null; |
@@ -622,6 +625,7 @@ abstract class VM extends ServiceObjectOwner { |
final ObservableList<Isolate> isolates = new ObservableList<Isolate>(); |
@observable String version = 'unknown'; |
+ @observable String hostCPU; |
@observable String targetCPU; |
@observable int architectureBits; |
@observable bool assertsEnabled = false; |
@@ -896,6 +900,7 @@ abstract class VM extends ServiceObjectOwner { |
_loaded = true; |
version = map['version']; |
+ hostCPU = map['hostCPU']; |
targetCPU = map['targetCPU']; |
architectureBits = map['architectureBits']; |
int startTimeMillis = map['startTime']; |
@@ -1117,7 +1122,7 @@ class HeapSnapshot { |
} |
/// State for a running isolate. |
-class Isolate extends ServiceObjectOwner { |
+class Isolate extends ServiceObjectOwner implements M.Isolate { |
static const kLoggingStream = '_Logging'; |
static const kExtensionStream = 'Extension'; |
@@ -2025,7 +2030,7 @@ class ServiceEvent extends ServiceObject { |
} |
} |
-class Breakpoint extends ServiceObject { |
+class Breakpoint extends ServiceObject implements M.Breakpoint { |
Breakpoint._empty(ServiceObjectOwner owner) : super._empty(owner); |
// TODO(turnidge): Add state to track if a breakpoint has been |
@@ -2121,7 +2126,7 @@ class LibraryDependency { |
} |
-class Library extends HeapObject { |
+class Library extends HeapObject implements M.LibraryRef { |
@observable String uri; |
@reflectable final dependencies = new ObservableList<LibraryDependency>(); |
@reflectable final scripts = new ObservableList<Script>(); |
@@ -2223,7 +2228,7 @@ class Allocations { |
bool get empty => accumulated.empty && current.empty; |
} |
-class Class extends HeapObject { |
+class Class extends HeapObject implements M.ClassRef { |
@observable Library library; |
@observable bool isAbstract; |
@@ -2918,7 +2923,7 @@ class LocalVarLocation { |
LocalVarLocation(this.line, this.column, this.endColumn); |
} |
-class Script extends HeapObject { |
+class Script extends HeapObject implements M.Script { |
final lines = new ObservableList<ScriptLine>(); |
@observable String uri; |
@observable String kind; |
@@ -2929,6 +2934,8 @@ class Script extends HeapObject { |
@observable int columnOffset; |
@observable Library library; |
+ String source; |
+ |
bool get immutable => true; |
String _shortUri; |
@@ -3030,6 +3037,7 @@ class Script extends HeapObject { |
lineOffset = map['lineOffset']; |
columnOffset = map['columnOffset']; |
_parseTokenPosTable(map['tokenPosTable']); |
+ source = map['source']; |
_processSource(map['source']); |
library = map['library']; |
} |
@@ -3987,7 +3995,7 @@ class MetricPoller { |
} |
} |
-class Frame extends ServiceObject { |
+class Frame extends ServiceObject implements M.Frame { |
@observable int index; |
@observable ServiceFunction function; |
@observable SourceLocation location; |