Fix how composedPath is called

Bug: b/149075352

Event.path should call composedPath if the result of the inline is
True. As it is, it only calls it if the result is null, which is
erroneous.

Change-Id: Idacc9ccddafc4374aca10de84265bf82cfbd0ab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134887
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
Srujan Gaddam 2020-02-07 23:25:22 +00:00
parent 1554a119ed
commit 8c0d72db1d
3 changed files with 3 additions and 3 deletions

View file

@ -14845,7 +14845,7 @@ class Event extends Interceptor {
}
List<EventTarget> get path =>
JS('bool', '!!#.composedPath', this) == null ? composedPath() : [];
JS<bool>('bool', '!!#.composedPath', this) ? composedPath() : [];
factory Event._(String type, [Map eventInitDict]) {
if (eventInitDict != null) {

View file

@ -15413,7 +15413,7 @@ class Event extends Interceptor {
}
List<EventTarget> get path =>
JS('bool', '!!#.composedPath', this) == null ? composedPath() : [];
JS<bool>('bool', '!!#.composedPath', this) ? composedPath() : [];
factory Event._(String type, [Map? eventInitDict]) {
if (eventInitDict != null) {

View file

@ -58,7 +58,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
}
List<EventTarget> get path =>
JS('bool', '!!#.composedPath', this) == null? composedPath() : [];
JS<bool>('bool', '!!#.composedPath', this) ? composedPath() : [];
$!MEMBERS
}