Enable AllocWithGrowth and OutOfMemoryError throwing.
Also fix a bug where we weren't correcting the pc for the first stack frame.
Change-Id: Ic4196987eac85eff2f6d14171b19b4f5890b6c4d
diff --git a/src/thread.h b/src/thread.h
index 7bd6855..c898a76 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -285,7 +285,7 @@
void ThrowNewExceptionV(const char* exception_class_descriptor, const char* fmt, va_list ap);
// This exception is special, because we need to pre-allocate an instance.
- void ThrowOutOfMemoryError();
+ void ThrowOutOfMemoryError(Class* c, size_t byte_count);
Frame FindExceptionHandler(void* throw_pc, void** handler_pc);
@@ -573,6 +573,9 @@
// Thread local, lazily allocated, long jump context. Used to deliver exceptions.
Context* long_jump_context_;
+ // A boolean telling us whether we're recursively throwing OOME.
+ uint32_t throwing_OOME_;
+
// TLS key used to retrieve the VM thread object.
static pthread_key_t pthread_key_self_;