diff --git a/runtime/observatory/lib/object_graph.dart b/runtime/observatory/lib/object_graph.dart index 18e0fae9298..e39f2cb7c9e 100644 --- a/runtime/observatory/lib/object_graph.dart +++ b/runtime/observatory/lib/object_graph.dart @@ -260,12 +260,10 @@ abstract class SnapshotObject { class _SnapshotObject implements SnapshotObject { final int _id; - final int identityHashCode; final _SnapshotGraph _graph; final String label; - _SnapshotObject._new(this._id, this._graph, this.label) - : identityHashCode = _graph._identityHashes![_id]; + _SnapshotObject._new(this._id, this._graph, this.label); bool operator ==(Object other) { if (other is _SnapshotObject) { @@ -275,6 +273,7 @@ class _SnapshotObject implements SnapshotObject { } int get hashCode => _id ^ _graph.hashCode; + int get identityHashCode => _graph._identityHashes![_id]; int get shallowSize => internalSize + externalSize; int get internalSize => _graph._internalSizes![_id]; diff --git a/runtime/observatory_2/lib/object_graph.dart b/runtime/observatory_2/lib/object_graph.dart index 21b426a0897..41b0bd39c69 100644 --- a/runtime/observatory_2/lib/object_graph.dart +++ b/runtime/observatory_2/lib/object_graph.dart @@ -260,12 +260,10 @@ abstract class SnapshotObject { class _SnapshotObject implements SnapshotObject { final int _id; - final int identityHashCode; final _SnapshotGraph _graph; final String label; - _SnapshotObject._new(this._id, this._graph, this.label) - : identityHashCode = _graph._identityHashes[_id]; + _SnapshotObject._new(this._id, this._graph, this.label); bool operator ==(Object other) { if (other is _SnapshotObject) { @@ -275,6 +273,7 @@ class _SnapshotObject implements SnapshotObject { } int get hashCode => _id ^ _graph.hashCode; + int get identityHashCode => _graph._identityHashes[_id]; int get shallowSize => internalSize + externalSize; int get internalSize => _graph._internalSizes[_id];