mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 12:14:36 +00:00
Fix many warnings/errors when building Observatory
BUG= R=rmacnak@google.com Review-Url: https://codereview.chromium.org/2783933002 .
This commit is contained in:
parent
9575657668
commit
66aca8a36e
|
@ -49,8 +49,7 @@ class CpuProfileVirtualTreeElement extends HtmlElement implements Renderable {
|
|||
_r.dirty();
|
||||
}
|
||||
|
||||
factory CpuProfileVirtualTreeElement(
|
||||
M.IsolateRef isolate, M.SampleProfile profile,
|
||||
factory CpuProfileVirtualTreeElement(Object owner, M.SampleProfile profile,
|
||||
{ProfileTreeMode mode: ProfileTreeMode.function,
|
||||
M.SampleProfileType type: M.SampleProfileType.cpu,
|
||||
M.ProfileTreeDirection direction: M.ProfileTreeDirection.exclusive,
|
||||
|
@ -60,7 +59,7 @@ class CpuProfileVirtualTreeElement extends HtmlElement implements Renderable {
|
|||
assert(direction != null);
|
||||
CpuProfileVirtualTreeElement e = document.createElement(tag.name);
|
||||
e._r = new RenderingScheduler(e, queue: queue);
|
||||
e._isolate = isolate;
|
||||
e._isolate = owner;
|
||||
e._profile = profile;
|
||||
e._mode = mode;
|
||||
e._type = type;
|
||||
|
@ -117,7 +116,6 @@ class CpuProfileVirtualTreeElement extends HtmlElement implements Renderable {
|
|||
break;
|
||||
default:
|
||||
throw new Exception('Unknown SampleProfileType: $type');
|
||||
break;
|
||||
}
|
||||
if (filters != null) {
|
||||
tree = filters.fold(tree, (tree, filter) {
|
||||
|
|
|
@ -452,7 +452,6 @@ class ReloadCommand extends DebuggerCommand {
|
|||
await debugger.refreshStack();
|
||||
} on S.ServerRpcException catch (e) {
|
||||
if (e.code == S.ServerRpcException.kIsolateReloadBarred ||
|
||||
e.code == S.ServerRpcException.kIsolateReloadFailed ||
|
||||
e.code == S.ServerRpcException.kIsolateIsReloading) {
|
||||
debugger.console.printRed(e.data['details']);
|
||||
} else {
|
||||
|
|
|
@ -134,7 +134,7 @@ class IsolateViewElement extends HtmlElement implements Renderable {
|
|||
void render() {
|
||||
final uptime = new DateTime.now().difference(_isolate.startTime);
|
||||
final libraries = _isolate.libraries.toList();
|
||||
final List<Thread> threads = _isolate.threads;
|
||||
final List<M.Thread> threads = _isolate.threads;
|
||||
children = [
|
||||
navBar([
|
||||
new NavTopMenuElement(queue: _r.queue),
|
||||
|
@ -362,7 +362,7 @@ class IsolateViewElement extends HtmlElement implements Renderable {
|
|||
];
|
||||
}
|
||||
|
||||
DivElement _populateThreadInfo(Thread t) {
|
||||
DivElement _populateThreadInfo(M.Thread t) {
|
||||
int index = 0;
|
||||
return new DivElement()
|
||||
..classes = ['indent']
|
||||
|
|
|
@ -53,6 +53,8 @@ abstract class FunctionCallTree extends CallTree {
|
|||
|
||||
abstract class CallTreeNode {
|
||||
double get percentage;
|
||||
int get inclusiveNativeAllocations;
|
||||
int get exclusiveNativeAllocations;
|
||||
Iterable<CallTreeNode> get children;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ abstract class Thread {
|
|||
/// The task type associated with the thread.
|
||||
ThreadKind get kind;
|
||||
|
||||
String get kindString;
|
||||
|
||||
/// The maximum amount of zone memory in bytes allocated by a thread at a
|
||||
/// given time throughout the entire life of the thread.
|
||||
int get zoneHighWatermark;
|
||||
|
|
|
@ -13,7 +13,11 @@ abstract class VMRef {
|
|||
String get displayName;
|
||||
}
|
||||
|
||||
abstract class VM implements VMRef {
|
||||
abstract class ServiceObjectOwner {
|
||||
Future<dynamic> invokeRpc(String method, Map params);
|
||||
}
|
||||
|
||||
abstract class VM implements VMRef, ServiceObjectOwner {
|
||||
/// Word length on target architecture (e.g. 32, 64).
|
||||
int get architectureBits;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class SampleProfileLoadingProgress extends M.SampleProfileLoadingProgress {
|
|||
Stream<SampleProfileLoadingProgressEvent> get onProgress =>
|
||||
_onProgress.stream;
|
||||
|
||||
final ServiceObjectOwner owner;
|
||||
final M.ServiceObjectOwner owner;
|
||||
final S.Class cls;
|
||||
final M.SampleProfileTag tag;
|
||||
final bool clear;
|
||||
|
@ -174,7 +174,7 @@ class NativeMemorySampleProfileRepository
|
|||
SampleProfileLoadingProgress _last;
|
||||
|
||||
Stream<SampleProfileLoadingProgressEvent> get(M.VM vm, M.SampleProfileTag t,
|
||||
{bool forceFetch: false}) {
|
||||
{bool forceFetch: false, bool clear: false}) {
|
||||
assert(forceFetch != null);
|
||||
if ((_last != null) && !forceFetch) {
|
||||
_last.reuse();
|
||||
|
|
|
@ -441,7 +441,8 @@ class RetainingObject implements M.RetainingObject {
|
|||
RetainingObject(this.object);
|
||||
}
|
||||
|
||||
abstract class ServiceObjectOwner extends ServiceObject {
|
||||
abstract class ServiceObjectOwner extends ServiceObject
|
||||
implements M.ServiceObjectOwner {
|
||||
/// Creates an empty [ServiceObjectOwner].
|
||||
ServiceObjectOwner._empty(ServiceObjectOwner owner) : super._empty(owner);
|
||||
|
||||
|
@ -449,6 +450,8 @@ abstract class ServiceObjectOwner extends ServiceObject {
|
|||
/// The result may come from the cache. The result will not necessarily
|
||||
/// be [loaded].
|
||||
ServiceObject getFromMap(Map map);
|
||||
|
||||
Future<M.Object> invokeRpc(String method, Map params);
|
||||
}
|
||||
|
||||
abstract class Location implements M.Location {
|
||||
|
@ -832,7 +835,7 @@ abstract class VM extends ServiceObjectOwner implements M.VM {
|
|||
});
|
||||
}
|
||||
|
||||
Future<ServiceObject> invokeRpc(String method, Map params) {
|
||||
Future<dynamic> invokeRpc(String method, Map params) {
|
||||
return invokeRpcNoUpgrade(method, params).then((Map response) {
|
||||
var obj = new ServiceObject._fromMap(this, response);
|
||||
if ((obj != null) && obj.canCache) {
|
||||
|
@ -1465,7 +1468,7 @@ class Isolate extends ServiceObjectOwner implements M.Isolate {
|
|||
return vm.invokeRpcNoUpgrade(method, params);
|
||||
}
|
||||
|
||||
Future<ServiceObject> invokeRpc(String method, Map params) {
|
||||
Future<dynamic> invokeRpc(String method, Map params) {
|
||||
return invokeRpcNoUpgrade(method, params).then((Map response) {
|
||||
return getFromMap(response);
|
||||
});
|
||||
|
|
|
@ -10,6 +10,7 @@ class HeapSnapshotMock implements M.HeapSnapshot {
|
|||
final int references;
|
||||
final int size;
|
||||
final M.HeapSnapshotDominatorNode dominatorTree;
|
||||
final M.HeapSnapshotMergedDominatorNode mergedDominatorTree = null;
|
||||
final Iterable<M.HeapSnapshotClassReferences> classReferences;
|
||||
|
||||
const HeapSnapshotMock(
|
||||
|
@ -24,6 +25,7 @@ class HeapSnapshotMock implements M.HeapSnapshot {
|
|||
class HeapSnapshotDominatorNodeMock implements M.HeapSnapshotDominatorNode {
|
||||
final int shallowSize;
|
||||
final int retainedSize;
|
||||
final bool isStack = false;
|
||||
final Future<M.ObjectRef> object;
|
||||
final Iterable<M.HeapSnapshotDominatorNode> children;
|
||||
|
||||
|
|
|
@ -28,6 +28,10 @@ class IsolateMock implements M.Isolate {
|
|||
final M.DebugEvent pauseEvent;
|
||||
final M.LibraryRef rootLibrary;
|
||||
final M.FunctionRef entry;
|
||||
final Iterable<M.Thread> threads = null;
|
||||
final int zoneHighWatermark = 0;
|
||||
final int numZoneHandles = 0;
|
||||
final int numScopedHandles = 0;
|
||||
|
||||
const IsolateMock(
|
||||
{this.id: 'i-id',
|
||||
|
|
|
@ -21,6 +21,13 @@ class VMMock implements M.VM {
|
|||
final int maxRSS;
|
||||
final DateTime startTime;
|
||||
final Iterable<M.IsolateRef> isolates;
|
||||
final int nativeZoneMemoryUsage = 0;
|
||||
final int heapAllocatedMemoryUsage = 0;
|
||||
final int heapAllocationCount = 0;
|
||||
|
||||
Future<dynamic> invokeRpc(String method, Map params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const VMMock(
|
||||
{this.name: 'vm-name',
|
||||
|
|
|
@ -38,7 +38,7 @@ class HeapSnapshotRepositoryMock implements M.HeapSnapshotRepository {
|
|||
final HeapSnapshotRepositoryMockCallback _get;
|
||||
|
||||
Stream<M.HeapSnapshotLoadingProgressEvent> get(M.IsolateRef isolate,
|
||||
{bool gc: false}) {
|
||||
{M.HeapSnapshotRoots roots: M.HeapSnapshotRoots.vm, bool gc: false}) {
|
||||
if (_get != null) {
|
||||
return _get(isolate, gc);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue