mirror of
https://github.com/dart-lang/sdk
synced 2024-09-22 12:23:32 +00:00
Make is and as checks handle JavaScriptFunction correctly.
BUG= R=sigmund@google.com, sra@google.com Review URL: https://codereview.chromium.org/1416803002 .
This commit is contained in:
parent
be1fcb9441
commit
f9551da8e3
|
@ -3179,8 +3179,9 @@ propertyTypeCast(value, property) {
|
|||
*/
|
||||
interceptedTypeCheck(value, property) {
|
||||
if (value == null) return value;
|
||||
if ((identical(JS('String', 'typeof #', value), 'object'))
|
||||
&& JS('bool', '#[#]', getInterceptor(value), property)) {
|
||||
if ((JS('bool', 'typeof # === "object"', value) ||
|
||||
JS('bool', 'typeof # === "function"', value)) &&
|
||||
JS('bool', '#[#]', getInterceptor(value), property)) {
|
||||
return value;
|
||||
}
|
||||
propertyTypeError(value, property);
|
||||
|
@ -3192,9 +3193,10 @@ interceptedTypeCheck(value, property) {
|
|||
* prototype at load time.
|
||||
*/
|
||||
interceptedTypeCast(value, property) {
|
||||
if (value == null
|
||||
|| ((JS('bool', 'typeof # === "object"', value))
|
||||
&& JS('bool', '#[#]', getInterceptor(value), property))) {
|
||||
if (value == null ||
|
||||
((JS('bool', 'typeof # === "object"', value) ||
|
||||
JS('bool', 'typeof # === "function"', value)) &&
|
||||
JS('bool', '#[#]', getInterceptor(value), property))) {
|
||||
return value;
|
||||
}
|
||||
propertyTypeCastError(value, property);
|
||||
|
|
|
@ -415,6 +415,3 @@ window_nosuchmethod_test: StaticWarning
|
|||
|
||||
[ $compiler == dart2js && $cps_ir ]
|
||||
resource_http_test: Crash # (await for(var b in r.openRead()){bytes.addAll(b);}): await for
|
||||
|
||||
[ $compiler == dart2js && $checked ]
|
||||
js_typed_interop_test/closure: RuntimeError # Issue 24608
|
Loading…
Reference in a new issue