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

Unified Diff: runtime/bin/dartutils.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
« no previous file with comments | « runtime/bin/builtin_in.cc ('k') | runtime/bin/eventhandler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
===================================================================
--- runtime/bin/dartutils.cc (revision 1469)
+++ runtime/bin/dartutils.cc (working copy)
@@ -13,14 +13,14 @@
ASSERT(Dart_IsInteger(value_obj));
int64_t value = 0;
Dart_Handle result = Dart_IntegerValue(value_obj, &value);
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
return value;
}
const char* DartUtils::GetStringValue(Dart_Handle str_obj) {
const char* cstring = NULL;
Dart_Handle result = Dart_StringToCString(str_obj, &cstring);
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
return cstring;
}
@@ -28,7 +28,7 @@
bool DartUtils::GetBooleanValue(Dart_Handle bool_obj) {
bool value = false;
Dart_Handle result = Dart_BooleanValue(bool_obj, &value);
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
return value;
}
@@ -38,14 +38,14 @@
Dart_Handle result = Dart_SetInstanceField(handle,
Dart_NewString(name),
Dart_NewInteger(val));
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
}
intptr_t DartUtils::GetIntegerInstanceField(Dart_Handle handle,
const char* name) {
Dart_Handle result =
Dart_GetInstanceField(handle, Dart_NewString(name));
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
intptr_t value = DartUtils::GetIntegerValue(result);
return value;
}
@@ -56,5 +56,5 @@
Dart_Handle result = Dart_SetInstanceField(handle,
Dart_NewString(name),
Dart_NewString(val));
- ASSERT(Dart_IsValid(result));
+ ASSERT(!Dart_IsError(result));
}
« no previous file with comments | « runtime/bin/builtin_in.cc ('k') | runtime/bin/eventhandler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698