Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { | 7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { |
| 8 | 8 |
| 9 static const String INDEX_SIZE = 'IndexSizeError'; | 9 static const String INDEX_SIZE = 'IndexSizeError'; |
| 10 static const String HIERARCHY_REQUEST = 'HierarchyRequestError'; | 10 static const String HIERARCHY_REQUEST = 'HierarchyRequestError'; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 return errorName; | 42 return errorName; |
| 43 } | 43 } |
| 44 $endif | 44 $endif |
| 45 $if JSINTEROP | 45 $if JSINTEROP |
| 46 String _name; | 46 String _name; |
| 47 String _message; | 47 String _message; |
| 48 | 48 |
| 49 // To suppress missing implicit constructor warnings. | 49 // To suppress missing implicit constructor warnings. |
| 50 factory DomException._() { throw new UnsupportedError("Not supported"); } | 50 factory DomException._() { throw new UnsupportedError("Not supported"); } |
| 51 | 51 |
| 52 @Deprecated("Internal Use Only") | 52 @Deprecated("Internal Use Only") |
|
Jacob
2017/06/08 23:50:00
probably dead but do a text search of
third_party/
| |
| 53 static DomException internalCreateDomException() { | |
| 54 return new DomException._internalWrap(); | |
| 55 } | |
| 56 | |
| 57 external factory DomException._internalWrap(); | |
| 58 | |
| 59 @Deprecated("Internal Use Only") | |
| 60 DomException.internal_() { } | 53 DomException.internal_() { } |
| 61 | 54 |
| 62 @Deprecated("Internal Use Only") | 55 @Deprecated("Internal Use Only") |
| 63 DomException.jsInterop(String m) { | 56 DomException.jsInterop(String m) { |
| 64 var name_index = m.indexOf(': '); | 57 var name_index = m.indexOf(': '); |
| 65 if (name_index < 0) { | 58 if (name_index < 0) { |
| 66 _name = ""; | 59 _name = ""; |
| 67 _message = m; | 60 _message = m; |
| 68 } else { | 61 } else { |
| 69 _name = m.substring(0, name_index); | 62 _name = m.substring(0, name_index); |
| 70 _message = m.substring(name_index + 1).trim(); | 63 _message = m.substring(name_index + 1).trim(); |
| 71 } | 64 } |
| 72 } | 65 } |
| 73 | 66 |
| 74 @DomName('DOMException.message') | 67 @DomName('DOMException.message') |
| 75 @DocsEditable() | 68 @DocsEditable() |
| 76 String get message => _message; | 69 String get message => _message ?? |
| 70 (_message = _blink.BlinkDOMException.instance.message_Getter_(this)); | |
| 77 | 71 |
| 78 @DomName('DOMException.name') | 72 @DomName('DOMException.name') |
| 79 @DocsEditable() | 73 @DocsEditable() |
| 80 String get name => _name; | 74 String get name => _name ?? |
| 75 (_name = _blink.BlinkDOMException.instance.name_Getter_(this)); | |
| 81 | 76 |
| 82 @DomName('DOMException.toString') | 77 @DomName('DOMException.toString') |
| 83 @DocsEditable() | 78 @DocsEditable() |
| 84 String toString() => "${_name}: $_message"; | 79 String toString() => "$name: $message"; |
| 85 | 80 |
| 86 $else | 81 $else |
| 87 $!MEMBERS | 82 $!MEMBERS |
| 88 $endif | 83 $endif |
| 89 $if DART2JS | 84 $if DART2JS |
| 90 @DomName('DOMException.toString') | 85 @DomName('DOMException.toString') |
| 91 @DocsEditable() | 86 @DocsEditable() |
| 92 String toString() => JS('String', 'String(#)', this); | 87 String toString() => JS('String', 'String(#)', this); |
| 93 $endif | 88 $endif |
| 94 } | 89 } |
| OLD | NEW |