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

Unified Diff: runtime/vm/object.h

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/vm/isolate_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 1469)
+++ runtime/vm/object.h (working copy)
@@ -139,7 +139,7 @@
kExceptionHandlersClass,
kContextClass,
kContextScopeClass,
- kApiFailureClass,
+ kApiErrorClass,
kMaxId,
kInvalidIndex = -1,
};
@@ -239,7 +239,7 @@
}
static RawClass* context_class() { return context_class_; }
static RawClass* context_scope_class() { return context_scope_class_; }
- static RawClass* api_failure_class() { return api_failure_class_; }
+ static RawClass* api_error_class() { return api_error_class_; }
static int GetSingletonClassIndex(const RawClass* raw_class);
static RawClass* GetSingletonClass(int index);
@@ -332,7 +332,7 @@
static RawClass* exception_handlers_class_; // Class of ExceptionHandlers.
static RawClass* context_class_; // Class of the Context vm object.
static RawClass* context_scope_class_; // Class of ContextScope vm object.
- static RawClass* api_failure_class_; // Class of ApiFailure.
+ static RawClass* api_error_class_; // Class of ApiError.
friend class Class;
friend class SnapshotReader;
@@ -2062,24 +2062,27 @@
};
-class ApiFailure : public Object {
+class ApiError : public Object {
public:
- RawString* message() const { return raw_ptr()->message_; }
- static intptr_t message_offset() {
- return OFFSET_OF(RawApiFailure, message_);
+ RawObject* data() const { return raw_ptr()->data_; }
+ static intptr_t data_offset() {
+ return OFFSET_OF(RawApiError, data_);
}
static intptr_t InstanceSize() {
- return RoundedAllocationSize(sizeof(RawApiFailure));
+ return RoundedAllocationSize(sizeof(RawApiError));
}
- static RawApiFailure* New(const String& message,
- Heap::Space space = Heap::kNew);
+ static RawApiError* New(const String& message,
+ Heap::Space space = Heap::kNew);
+ static RawApiError* New(const UnhandledException& exception,
+ Heap::Space space = Heap::kNew);
+
private:
- void set_message(const String& message) const;
+ void set_data(const Object& data) const;
- HEAP_OBJECT_IMPLEMENTATION(ApiFailure, Object);
+ HEAP_OBJECT_IMPLEMENTATION(ApiError, Object);
friend class Class;
};
« no previous file with comments | « runtime/vm/isolate_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698