Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: Source/bindings/dart/DartDOMWrapper.cpp

Issue 490033005: Fallback to unsupported browser type instead of returning null (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/DartDOMWrapper.cpp
diff --git a/Source/bindings/dart/DartDOMWrapper.cpp b/Source/bindings/dart/DartDOMWrapper.cpp
index f73b9091e9978daef8fb4beadf3daee02d5e4c5e..348f47272be437b88ad80b407a334ae59604ce91 100644
--- a/Source/bindings/dart/DartDOMWrapper.cpp
+++ b/Source/bindings/dart/DartDOMWrapper.cpp
@@ -74,8 +74,12 @@ Dart_PersistentHandle DartDOMWrapper::dartClass(
}
}
if ((searchid <= 0) || Dart_IsError(type) || !Dart_IsType(type) || Dart_IsNull(type)) {
- DartUtilities::reportProblem(domData->scriptExecutionContext(), type);
- return Dart_Null();
+ char message[256];
+ strcpy(message, "Unsupported native browser type: ");
+ strncat(message, DartWebkitClassInfo[cid].jsName, 255 - strlen(message));
siva 2014/08/26 19:31:14 Why not use snprint(message, 256, "Unsupported nat
vsm 2014/08/27 07:50:29 Done.
+ Dart_Handle error = Dart_NewApiError(message);
+ DartUtilities::reportProblem(domData->scriptExecutionContext(), error);
+ type = Dart_GetType(htmlLibrary, Dart_NewStringFromCString("_UnsupportedBrowserObject"), 0, 0);
siva 2014/08/26 19:31:14 I hope this is just a temporary solution, when we
vsm 2014/08/27 08:05:10 As long as we continue to push the types to user c
}
persistentType = Dart_NewPersistentHandle(type);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698