Get the name and message from DOMException correctly

BUG=
R=jacobr@google.com, terry@google.com

Review-Url: https://codereview.chromium.org/2931903003 .
This commit is contained in:
Alan Knight 2017-06-13 08:59:28 -07:00
parent fbaa7d45c4
commit 6042ae4bd8
2 changed files with 11 additions and 20 deletions

View file

@ -11724,13 +11724,6 @@ class DomException extends DartHtmlDomObject {
throw new UnsupportedError("Not supported");
}
@Deprecated("Internal Use Only")
static DomException internalCreateDomException() {
return new DomException._internalWrap();
}
external factory DomException._internalWrap();
@Deprecated("Internal Use Only")
DomException.internal_() {}
@ -11748,15 +11741,18 @@ class DomException extends DartHtmlDomObject {
@DomName('DOMException.message')
@DocsEditable()
String get message => _message;
String get message =>
_message ??
(_message = _blink.BlinkDOMException.instance.message_Getter_(this));
@DomName('DOMException.name')
@DocsEditable()
String get name => _name;
String get name =>
_name ?? (_name = _blink.BlinkDOMException.instance.name_Getter_(this));
@DomName('DOMException.toString')
@DocsEditable()
String toString() => "${_name}: $_message";
String toString() => "$name: $message";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a

View file

@ -49,13 +49,6 @@ $if JSINTEROP
// To suppress missing implicit constructor warnings.
factory DomException._() { throw new UnsupportedError("Not supported"); }
@Deprecated("Internal Use Only")
static DomException internalCreateDomException() {
return new DomException._internalWrap();
}
external factory DomException._internalWrap();
@Deprecated("Internal Use Only")
DomException.internal_() { }
@ -73,15 +66,17 @@ $if JSINTEROP
@DomName('DOMException.message')
@DocsEditable()
String get message => _message;
String get message => _message ??
(_message = _blink.BlinkDOMException.instance.message_Getter_(this));
@DomName('DOMException.name')
@DocsEditable()
String get name => _name;
String get name => _name ??
(_name = _blink.BlinkDOMException.instance.name_Getter_(this));
@DomName('DOMException.toString')
@DocsEditable()
String toString() => "${_name}: $_message";
String toString() => "$name: $message";
$else
$!MEMBERS