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

Unified Diff: runtime/bin/socket.cc

Issue 8501034: Deal with unhandled exceptions the same way in all Dart api functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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
Index: runtime/bin/socket.cc
===================================================================
--- runtime/bin/socket.cc (revision 1328)
+++ runtime/bin/socket.cc (working copy)
@@ -46,7 +46,7 @@
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3));
intptr_t buffer_len = 0;
Dart_Handle result = Dart_ListLength(buffer_obj, &buffer_len);
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
ASSERT((offset + length) <= buffer_len);
if (Dart_IsVMFlagSet("short_socket_read")) {
@@ -58,7 +58,7 @@
if (bytes_read > 0) {
Dart_Handle result =
Dart_ListSetAsBytes(buffer_obj, offset, buffer, bytes_read);
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
} else if (bytes_read < 0) {
bytes_read = 0;
}
@@ -81,7 +81,7 @@
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3));
intptr_t buffer_len = 0;
Dart_Handle result = Dart_ListLength(buffer_obj, &buffer_len);
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
ASSERT((offset + length) <= buffer_len);
if (Dart_IsVMFlagSet("short_socket_write")) {
@@ -90,7 +90,7 @@
uint8_t* buffer = new uint8_t[length];
result = Dart_ListGetAsBytes(buffer_obj, offset, buffer, length);
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
intptr_t total_bytes_written =
Socket::Write(socket, reinterpret_cast<void*>(buffer), length);
delete[] buffer;

Powered by Google App Engine
This is Rietveld 408576698