mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 21:50:11 +00:00
Make getProperty
and callMethod
nullable
Fixes https://github.com/dart-lang/sdk/issues/29076 R=jacobr@google.com Review-Url: https://codereview.chromium.org/2755483003 .
This commit is contained in:
parent
ee6f460847
commit
9ab56aa655
|
@ -59,11 +59,11 @@ _convertDataTree(data) {
|
|||
newObject() => JS('=Object', '{}');
|
||||
|
||||
hasProperty(o, name) => JS('bool', '# in #', name, o);
|
||||
getProperty(o, name) => JS('Object', '#[#]', o, name);
|
||||
getProperty(o, name) => JS('Object|Null', '#[#]', o, name);
|
||||
setProperty(o, name, value) => JS('', '#[#]=#', o, name, value);
|
||||
|
||||
callMethod(o, String method, List args) =>
|
||||
JS('Object', '#[#].apply(#, #)', o, method, o, args);
|
||||
JS('Object|Null', '#[#].apply(#, #)', o, method, o, args);
|
||||
|
||||
instanceof(o, Function type) => JS('bool', '# instanceof #', o, type);
|
||||
callConstructor(Function constr, List arguments) {
|
||||
|
|
Loading…
Reference in a new issue