Index: Source/bindings/dart/DartDOMWrapper.cpp |
diff --git a/Source/bindings/dart/DartDOMWrapper.cpp b/Source/bindings/dart/DartDOMWrapper.cpp |
index f73b9091e9978daef8fb4beadf3daee02d5e4c5e..70a6b843be95ec3b6ff570d8c116832b02b06d4f 100644 |
--- a/Source/bindings/dart/DartDOMWrapper.cpp |
+++ b/Source/bindings/dart/DartDOMWrapper.cpp |
@@ -74,8 +74,16 @@ Dart_PersistentHandle DartDOMWrapper::dartClass( |
} |
} |
if ((searchid <= 0) || Dart_IsError(type) || !Dart_IsType(type) || Dart_IsNull(type)) { |
- DartUtilities::reportProblem(domData->scriptExecutionContext(), type); |
- return Dart_Null(); |
+ Dart_Handle error; |
+ if (Dart_IsError(type)) { |
+ error = type; |
+ } else { |
+ char message[256]; |
+ snprintf(message, 256, "Unsupported native browser type: %s", DartWebkitClassInfo[cid].jsName); |
+ error = Dart_NewApiError(message); |
+ } |
+ DartUtilities::reportProblem(domData->scriptExecutionContext(), error); |
+ type = Dart_GetType(htmlLibrary, Dart_NewStringFromCString("_UnsupportedBrowserObject"), 0, 0); |
} |
persistentType = Dart_NewPersistentHandle(type); |