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:
Harry Terkelsen 2017-03-14 15:54:03 -07:00
parent ee6f460847
commit 9ab56aa655

View file

@ -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) {