Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| =================================================================== |
| --- runtime/vm/dart_api_impl.cc (revision 969) |
| +++ runtime/vm/dart_api_impl.cc (working copy) |
| @@ -37,6 +37,17 @@ |
| return !obj.IsApiFailure(); |
| } |
| + |
| +DART_EXPORT void _Dart_ReportInvalidHandle(const char* file, |
| + int line, |
| + const char* handle, |
| + const char* message) { |
| + fprintf(stderr, "%s:%d: invalid handle: '%s':\n '%s'\n", |
| + file, line, handle, message); |
| + OS::Abort(); |
|
siva
2011/10/31 19:49:22
If we expect embedding code to use this then OS::A
turnidge
2011/10/31 21:30:22
My intention is that this is a convenience functio
|
| +} |
| + |
| + |
| DART_EXPORT const char* Dart_GetError(const Dart_Handle& handle) { |
| ASSERT(Isolate::Current() != NULL); |
| Zone zone; // Setup a VM zone as we are creating some handles. |
| @@ -56,8 +67,8 @@ |
| } |
| -DART_EXPORT Dart_Handle Dart_Error(const char* value) { |
| - return Api::Error(value); |
| +DART_EXPORT Dart_Handle Dart_Error(const char* error) { |
| + return Api::Error(error); |
| } |