Chromium Code Reviews| Index: Source/bindings/dart/DartUtilities.cpp |
| diff --git a/Source/bindings/dart/DartUtilities.cpp b/Source/bindings/dart/DartUtilities.cpp |
| index 99508573306e3ed8719d254eee05ae6a70c5c86c..ad93749483e9e77df6f136b86b12423ca8462874 100644 |
| --- a/Source/bindings/dart/DartUtilities.cpp |
| +++ b/Source/bindings/dart/DartUtilities.cpp |
| @@ -403,6 +403,21 @@ bool DartUtilities::isTypeSubclassOf(Dart_Handle type, intptr_t libraryId, const |
| return boolResult; |
| } |
| +bool DartUtilities::isTypeSubclassOfTag(Dart_Handle type, const String& tagName) |
| +{ |
| + Dart_Handle args[2] = { type, stringToDartString(tagName) }; |
| + Dart_Handle result = DartUtilities::invokeUtilsMethod("isTypeSubclassOfTag", 2, args); |
| + ASSERT(!Dart_IsError(result)); |
| + if (Dart_IsError(result)) |
|
vsm
2013/10/14 18:25:33
Move ASSERT into the if as ASSERT_NOT_REACHED?
blois
2013/10/14 19:24:13
Done.
|
| + return false; |
| + |
| + Dart_Handle exception = 0; |
| + bool boolResult = dartToBool(result, exception); |
| + if (exception) |
| + return false; |
| + return boolResult; |
| +} |
| + |
| bool DartUtilities::isTypedData(Dart_Handle handle) |
| { |
| return (Dart_GetTypeOfTypedData(handle) != Dart_TypedData_kInvalid) |