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

Unified Diff: runtime/bin/dartutils.cc

Issue 18531003: Cleanup VM error handling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo. Created 7 years, 5 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 | runtime/lib/error.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 3e107f8bbfc7e24e854c774bdad4dbc50deed64d..5de42acc9f4ca06374055d9840a76cf7dd0baea4 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -778,6 +778,7 @@ Dart_Handle DartUtils::NewDartOSError() {
Dart_Handle DartUtils::NewDartOSError(OSError* os_error) {
// Create a dart:io OSError object with the information retrieved from the OS.
Dart_Handle type = GetDartType(kIOLibURL, "OSError");
+ ASSERT(!Dart_IsError(type));
Dart_Handle args[2];
args[0] = NewString(os_error->message());
args[1] = Dart_NewInteger(os_error->code());
@@ -791,6 +792,7 @@ Dart_Handle DartUtils::NewDartExceptionWithOSError(const char* library_url,
Dart_Handle os_error) {
// Create a Dart Exception object with a message and an OSError.
Dart_Handle type = GetDartType(library_url, exception_name);
+ ASSERT(!Dart_IsError(type));
Dart_Handle args[2];
args[0] = NewString(message);
args[1] = os_error;
@@ -803,6 +805,7 @@ Dart_Handle DartUtils::NewDartExceptionWithMessage(const char* library_url,
const char* message) {
// Create a Dart Exception object with a message.
Dart_Handle type = GetDartType(library_url, exception_name);
+ ASSERT(!Dart_IsError(type));
if (message != NULL) {
Dart_Handle args[1];
args[0] = NewString(message);
@@ -832,7 +835,7 @@ Dart_Handle DartUtils::NewDartIOException(const char* exception_name,
Dart_Handle DartUtils::NewInternalError(const char* message) {
- return NewDartExceptionWithMessage(kCoreLibURL, "InternalError", message);
+ return NewDartExceptionWithMessage(kCoreLibURL, "_InternalError", message);
}
« no previous file with comments | « no previous file | runtime/lib/error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698