blob: 38bbe21cddbe5103621c16a0a6bb132df9d9a360 [file] [log] [blame]
<link rel="import" href="../../../../packages/polymer/polymer.html">
<link rel="import" href="error_view.html">
<link rel="import" href="inbound_reference.html">
<link rel="import" href="eval_link.html">
<polymer-element name="object-common">
<template>
<link rel="stylesheet" href="css/shared.css">
<div class="memberList">
<div class="memberItem">
<div class="memberName">class</div>
<div class="memberValue">
<class-ref ref="{{ object.clazz }}"></class-ref>
</div>
</div>
<div class="memberItem" title="Space for this object in memory">
<div class="memberName">shallow size</div>
<div class="memberValue">{{ object.size | formatSize }}</div>
</div>
<div class="memberItem" title="Space reachable from this object, excluding class references">
<div class="memberName">reachable size</div>
<div class="memberValue">
<template if="{{ reachableBytes == null }}">
<eval-link callback="{{ reachableSize }}"
label="[calculate]">
</eval-link>
</template>
<template if="{{ reachableBytes != null }}">
{{ reachableBytes | formatSize }}
</template>
</div>
</div>
<div class="memberItem" title="Space that would be reclaimed if references to this object were replaced with null">
<div class="memberName">retained size</div>
<div class="memberValue">
<template if="{{ retainedBytes == null }}">
<eval-link callback="{{ retainedSize }}"
label="[calculate]">
</eval-link>
</template>
<template if="{{ retainedBytes != null }}">
{{ retainedBytes | formatSize }}
</template>
</div>
</div>
<div class="memberItem">
<div class="memberName">retaining path</div>
<div class="memberValue">
<template if="{{ path == null }}">
<eval-link callback="{{ retainingPath }}"
label="[find]"
expr="20">
</eval-link>
</template>
<template if="{{ path != null }}">
<template if="{{ path['length'] == 0 }}">
&lt;root&gt;
</template>
<template repeat="{{ element in path['elements'] }}">
<div class="memberItem">
<div class="memberName">[{{ path['elements'].indexOf(element) }}]</div>
<div class="memberValue">
<template if="{{ element['parentField'] != null }}">
from <any-service-ref ref="{{ element['parentField'] }}"></any-service-ref> of
</template>
<template if="{{ element['parentListIndex'] != null }}">
from [{{ element['parentListIndex'] }}] of
</template>
<template if="{{ element['parentMapKey'] != null }}">
from [<any-service-ref ref="{{ element['parentMapKey'] }}"></any-service-ref>] of
</template>
<template if="{{ element['_parentWordOffset'] != null }}">
from word[{{ element['_parentWordOffset'] }}] of
</template>
<any-service-ref ref="{{ element['value'] }}"></any-service-ref>
</div>
</div>
</template>
<template if="{{ path['length'] > path['elements'].length }}">
showing {{ path['elements'].length }} of {{ path['length'] }}
<eval-link
callback="{{ retainingPath }}"
label="[find more]"
expr="{{ path['elements'].length * 2 }}">
</eval-link>
</template>
</template>
</div>
</div>
<div class="memberItem" title="Objects which directly reference this object">
<div class="memberName">inbound references</div>
<div class="memberValue">
<template if="{{ inboundReferences == null }}">
<eval-link callback="{{ fetchInboundReferences }}"
label="[find]"
expr="100">
</eval-link>
</template>
<template if="{{ inboundReferences != null }}">
<template if="{{ inboundReferences['references'].length == 0 }}">
&lt;root&gt;
</template>
<template repeat="{{ reference in inboundReferences['references'] }}">
<inbound-reference ref="{{ reference }}"></inbound-reference>
</template>
</template>
</div>
</div>
</div>
</template>
</polymer-element>
<script type="application/dart" src="object_common.dart"></script>