Add "class Throwable" and rewrite exception throwing to use JNI.
Change-Id: I79836075337eedfc5923ebff028176615ffd3598
diff --git a/src/object.h b/src/object.h
index 5a8f5be..0b1c072 100644
--- a/src/object.h
+++ b/src/object.h
@@ -1715,6 +1715,18 @@
DISALLOW_IMPLICIT_CONSTRUCTORS(String);
};
+class Throwable : public Object {
+ private:
+ // Field order required by test "ValidateFieldOrderOfJavaCppUnionClasses".
+ Throwable* cause_;
+ String* detail_message_;
+ Object* stack_state_; // Note this is Java volatile:
+ Object* stack_trace_;
+ Object* suppressed_exceptions_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(Throwable);
+};
+
inline bool Object::IsString() const {
// TODO use "klass_ == String::GetJavaLangString()" instead?
return klass_ == klass_->descriptor_->klass_;