| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of service; | 5 part of service; |
| 6 | 6 |
| 7 /// An RpcException represents an exceptional event that happened | 7 /// An RpcException represents an exceptional event that happened |
| 8 /// while invoking an rpc. | 8 /// while invoking an rpc. |
| 9 abstract class RpcException implements Exception { | 9 abstract class RpcException implements Exception { |
| 10 RpcException(this.message); | 10 RpcException(this.message); |
| (...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1787 | 1787 |
| 1788 String toString() => 'Class($vmName)'; | 1788 String toString() => 'Class($vmName)'; |
| 1789 } | 1789 } |
| 1790 | 1790 |
| 1791 class Instance extends ServiceObject { | 1791 class Instance extends ServiceObject { |
| 1792 @observable Class clazz; | 1792 @observable Class clazz; |
| 1793 @observable int size; | 1793 @observable int size; |
| 1794 @observable int retainedSize; | 1794 @observable int retainedSize; |
| 1795 @observable String valueAsString; // If primitive. | 1795 @observable String valueAsString; // If primitive. |
| 1796 @observable bool valueAsStringIsTruncated; | 1796 @observable bool valueAsStringIsTruncated; |
| 1797 @observable ServiceFunction closureFunc; // If a closure. | 1797 @observable ServiceFunction function; // If a closure. |
| 1798 @observable Context closureCtxt; // If a closure. | 1798 @observable Context context; // If a closure. |
| 1799 @observable String name; // If a Type. | 1799 @observable String name; // If a Type. |
| 1800 @observable int length; // If a List. | 1800 @observable int length; // If a List. |
| 1801 | 1801 |
| 1802 @observable var typeClass; | 1802 @observable var typeClass; |
| 1803 @observable var fields; | 1803 @observable var fields; |
| 1804 @observable var nativeFields; | 1804 @observable var nativeFields; |
| 1805 @observable var elements; | 1805 @observable var elements; |
| 1806 @observable var userName; | 1806 @observable var userName; |
| 1807 @observable var referent; // If a MirrorReference. | 1807 @observable var referent; // If a MirrorReference. |
| 1808 @observable Instance key; // If a WeakProperty. | 1808 @observable Instance key; // If a WeakProperty. |
| 1809 @observable Instance value; // If a WeakProperty. | 1809 @observable Instance value; // If a WeakProperty. |
| 1810 | 1810 |
| 1811 bool get isClosure => closureFunc != null; | 1811 bool get isClosure => function != null; |
| 1812 | 1812 |
| 1813 Instance._empty(ServiceObjectOwner owner) : super._empty(owner); | 1813 Instance._empty(ServiceObjectOwner owner) : super._empty(owner); |
| 1814 | 1814 |
| 1815 void _update(ObservableMap map, bool mapIsRef) { | 1815 void _update(ObservableMap map, bool mapIsRef) { |
| 1816 // Extract full properties. | 1816 // Extract full properties. |
| 1817 _upgradeCollection(map, isolate); | 1817 _upgradeCollection(map, isolate); |
| 1818 | 1818 |
| 1819 clazz = map['class']; | 1819 clazz = map['class']; |
| 1820 size = map['size']; | 1820 size = map['size']; |
| 1821 valueAsString = map['valueAsString']; | 1821 valueAsString = map['valueAsString']; |
| 1822 // Coerce absence to false. | 1822 // Coerce absence to false. |
| 1823 valueAsStringIsTruncated = map['valueAsStringIsTruncated'] == true; | 1823 valueAsStringIsTruncated = map['valueAsStringIsTruncated'] == true; |
| 1824 closureFunc = map['closureFunc']; | 1824 function = map['function']; |
| 1825 closureCtxt = map['closureCtxt']; | 1825 context = map['context']; |
| 1826 name = map['name']; | 1826 name = map['name']; |
| 1827 length = map['length']; | 1827 length = map['length']; |
| 1828 | 1828 |
| 1829 if (mapIsRef) { | 1829 if (mapIsRef) { |
| 1830 return; | 1830 return; |
| 1831 } | 1831 } |
| 1832 | 1832 |
| 1833 nativeFields = map['nativeFields']; | 1833 nativeFields = map['nativeFields']; |
| 1834 fields = map['fields']; | 1834 fields = map['fields']; |
| 1835 elements = map['elements']; | 1835 elements = map['elements']; |
| 1836 typeClass = map['type_class']; | 1836 typeClass = map['type_class']; |
| 1837 userName = map['user_name']; | 1837 userName = map['user_name']; |
| 1838 referent = map['referent']; | 1838 referent = map['referent']; |
| 1839 key = map['key']; | 1839 key = map['key']; |
| 1840 value = map['value']; | 1840 value = map['value']; |
| 1841 | 1841 |
| 1842 // We are fully loaded. | 1842 // We are fully loaded. |
| 1843 _loaded = true; | 1843 _loaded = true; |
| 1844 } | 1844 } |
| 1845 | 1845 |
| 1846 String get shortName { | 1846 String get shortName { |
| 1847 if (isClosure) { | 1847 if (isClosure) { |
| 1848 return closureFunc.qualifiedName; | 1848 return function.qualifiedName; |
| 1849 } | 1849 } |
| 1850 if (valueAsString != null) { | 1850 if (valueAsString != null) { |
| 1851 return valueAsString; | 1851 return valueAsString; |
| 1852 } | 1852 } |
| 1853 return 'a ${clazz.name}'; | 1853 return 'a ${clazz.name}'; |
| 1854 } | 1854 } |
| 1855 | 1855 |
| 1856 Future<ServiceObject> evaluate(String expression) { | 1856 Future<ServiceObject> evaluate(String expression) { |
| 1857 return isolate._eval(this, expression); | 1857 return isolate._eval(this, expression); |
| 1858 } | 1858 } |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3154 var v = list[i]; | 3154 var v = list[i]; |
| 3155 if ((v is ObservableMap) && _isServiceMap(v)) { | 3155 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 3156 list[i] = owner.getFromMap(v); | 3156 list[i] = owner.getFromMap(v); |
| 3157 } else if (v is ObservableList) { | 3157 } else if (v is ObservableList) { |
| 3158 _upgradeObservableList(v, owner); | 3158 _upgradeObservableList(v, owner); |
| 3159 } else if (v is ObservableMap) { | 3159 } else if (v is ObservableMap) { |
| 3160 _upgradeObservableMap(v, owner); | 3160 _upgradeObservableMap(v, owner); |
| 3161 } | 3161 } |
| 3162 } | 3162 } |
| 3163 } | 3163 } |
| OLD | NEW |