| Index: runtime/bin/file.cc
|
| ===================================================================
|
| --- runtime/bin/file.cc (revision 1469)
|
| +++ runtime/bin/file.cc (working copy)
|
| @@ -148,7 +148,7 @@
|
| DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3));
|
| intptr_t array_len = 0;
|
| Dart_Handle result = Dart_ListLength(buffer_obj, &array_len);
|
| - ASSERT(Dart_IsValid(result));
|
| + ASSERT(!Dart_IsError(result));
|
| ASSERT((offset + length) <= array_len);
|
| uint8_t* buffer = new uint8_t[length];
|
| int total_bytes_read =
|
| @@ -159,7 +159,7 @@
|
| if (total_bytes_read >= 0) {
|
| result =
|
| Dart_ListSetAsBytes(buffer_obj, offset, buffer, total_bytes_read);
|
| - ASSERT(Dart_IsValid(result));
|
| + ASSERT(!Dart_IsError(result));
|
| return_value = total_bytes_read;
|
| }
|
| delete[] buffer;
|
| @@ -184,11 +184,11 @@
|
| 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);
|
| uint8_t* buffer = new uint8_t[length];
|
| result = Dart_ListGetAsBytes(buffer_obj, offset, buffer, length);
|
| - ASSERT(Dart_IsValid(result));
|
| + ASSERT(!Dart_IsError(result));
|
| int total_bytes_written =
|
| file->Write(reinterpret_cast<void*>(buffer), length);
|
| if (total_bytes_written >= 0) {
|
|
|