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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 2167053002: Converted Observatory nav-notify element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Added tests Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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 f82f25cf840fd4de4495c611c728f93eac61bc33..4110e923f26e074f58201e5b51d69a976ca3f22c 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,7 +70,8 @@ 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})';
@@ -424,7 +425,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 +605,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 +624,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 +899,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 +1121,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';
@@ -2034,7 +2038,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
@@ -2130,7 +2134,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>();
@@ -2232,7 +2236,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;
@@ -2927,7 +2931,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;
@@ -2938,6 +2942,8 @@ class Script extends HeapObject {
@observable int columnOffset;
@observable Library library;
+ String source;
+
bool get immutable => true;
String _shortUri;
@@ -3039,6 +3045,7 @@ class Script extends HeapObject {
lineOffset = map['lineOffset'];
columnOffset = map['columnOffset'];
_parseTokenPosTable(map['tokenPosTable']);
+ source = map['source'];
_processSource(map['source']);
library = map['library'];
}
@@ -3996,7 +4003,7 @@ class MetricPoller {
}
}
-class Frame extends ServiceObject {
+class Frame extends ServiceObject implements M.Frame {
@observable int index;
@observable ServiceFunction function;
@observable SourceLocation location;

Powered by Google App Engine
This is Rietveld 408576698