diff --git a/sdk/lib/_internal/js_shared/lib/rti.dart b/sdk/lib/_internal/js_shared/lib/rti.dart index e9aa7efa028..9db2dfd049c 100644 --- a/sdk/lib/_internal/js_shared/lib/rti.dart +++ b/sdk/lib/_internal/js_shared/lib/rti.dart @@ -18,7 +18,7 @@ import 'dart:_foreign_helper' RAW_DART_FUNCTION_REF, TYPE_REF; import 'dart:_interceptors' - show JavaScriptFunction, JSArray, JSNull, JSUnmodifiableArray, JSObject; + show JavaScriptFunction, JSArray, JSNull, JSUnmodifiableArray; import 'dart:_js_helper' as records show createRecordTypePredicate, getRtiForRecord; @@ -1303,8 +1303,6 @@ Object? _simpleSpecializedIsTest(Rti testRti) { isFn = RAW_DART_FUNCTION_REF(_isString); } else if (_Utils.isIdentical(testRti, TYPE_REF())) { isFn = RAW_DART_FUNCTION_REF(_isBool); - } else if (_Utils.isIdentical(testRti, TYPE_REF())) { - isFn = RAW_DART_FUNCTION_REF(_isJSObject); } return isFn; } @@ -1675,24 +1673,6 @@ String? _asStringQ(dynamic object) { throw _TypeError.forType(object, 'String?'); } -bool _isJSObject(Object? object) { - if (object == null) return false; - if (JS('bool', 'typeof # == "object"', object)) { - if (_isDartObject(object)) return false; - return true; - } - if (JS('bool', 'typeof # == "function"', object)) { - if (JS_GET_FLAG('DEV_COMPILER')) { - // DDC functions have a signature attached. - var signatureName = JS_GET_NAME(JsGetName.SIGNATURE_NAME); - var signature = JS('', '#[#]', object, signatureName); - return signature == null; - } - return true; - } - return false; -} - String _rtiArrayToString(Object? array, List? genericContext) { String s = '', sep = ''; for (int i = 0; i < _Utils.arrayLength(array); i++) {