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

Unified Diff: runtime/vm/debugger_api_impl.cc

Issue 12082126: Cleanup api for isolate state checking. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_api_impl.cc
===================================================================
--- runtime/vm/debugger_api_impl.cc (revision 18012)
+++ runtime/vm/debugger_api_impl.cc (working copy)
@@ -265,9 +265,9 @@
}
intptr_t line = line_number.AsInt64Value();
- const char* msg = CheckIsolateState(isolate);
- if (msg != NULL) {
- return Api::NewError("%s", msg);
+ Dart_Handle state = Api::CheckIsolateState(isolate);
+ if (Dart_IsError(state)) {
+ return state;
}
Dart_Handle result = Api::True(isolate);
@@ -328,9 +328,9 @@
UNWRAP_AND_CHECK_PARAM(String, function_name, function_name_in);
CHECK_NOT_NULL(breakpoint);
- const char* msg = CheckIsolateState(isolate);
- if (msg != NULL) {
- return Api::NewError("%s", msg);
+ Dart_Handle state = Api::CheckIsolateState(isolate);
+ if (Dart_IsError(state)) {
+ return state;
}
// Resolve the breakpoint target function.
@@ -371,9 +371,9 @@
UNWRAP_AND_CHECK_PARAM(String, class_name, class_name_in);
UNWRAP_AND_CHECK_PARAM(String, function_name, function_name_in);
- const char* msg = CheckIsolateState(isolate);
- if (msg != NULL) {
- return Api::NewError("%s", msg);
+ Dart_Handle state = Api::CheckIsolateState(isolate);
+ if (Dart_IsError(state)) {
+ return state;
}
// Resolve the breakpoint target function.
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698