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

Unified Diff: runtime/vm/raw_object.h

Issue 8334009: Use the distinguished class, ApiFailure, to signal when a Dart_Result is (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 2 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
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 478)
+++ runtime/vm/raw_object.h (working copy)
@@ -37,6 +37,7 @@
V(Context) \
V(ContextScope) \
V(UnhandledException) \
+ V(ApiFailure) \
V(Instance) \
V(Number) \
V(Integer) \
@@ -588,6 +589,19 @@
};
+class RawApiFailure : public RawObject {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ApiFailure);
+
+ RawObject** from() {
+ return reinterpret_cast<RawObject**>(&ptr()->message_);
+ }
+ RawString* message_;
+ RawObject** to() {
+ return reinterpret_cast<RawObject**>(&ptr()->message_);
+ }
+};
+
+
class RawInstance : public RawObject {
RAW_HEAP_OBJECT_IMPLEMENTATION(Instance);
};
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698