| Index: sdk/lib/_internal/js_runtime/lib/js_helper.dart
|
| diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
|
| index a80f0e243ae5db915c12811c786ca1ab66a4ada3..07d1cbb60b64be5572297a6b6252656ed7ee68e3 100644
|
| --- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
|
| +++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
|
| @@ -154,6 +154,15 @@ bool isDartFunctionTypeRti(Object type) {
|
| JS_GET_NAME(JsGetName.FUNCTION_CLASS_TYPE_NAME));
|
| }
|
|
|
| +/// Returns true if the given [type] is _the_ `Null` type.
|
| +@ForceInline()
|
| +bool isNullType(Object type) {
|
| + return JS_BUILTIN('returns:bool;effects:none;depends:none',
|
| + JsBuiltin.isGivenTypeRti,
|
| + type,
|
| + JS_GET_NAME(JsGetName.NULL_CLASS_TYPE_NAME));
|
| +}
|
| +
|
| /// Returns whether the given type is _the_ Dart Object type.
|
| // TODO(floitsch): move this to foreign_helper.dart or similar.
|
| @ForceInline()
|
|
|