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/jni_internal.cc b/src/jni_internal.cc
index bc1de52..f9d536b 100644
--- a/src/jni_internal.cc
+++ b/src/jni_internal.cc
@@ -1803,10 +1803,7 @@
String* s = Decode<String*>(ts, java_string);
size_t byte_count = s->GetUtfLength();
char* bytes = new char[byte_count + 1];
- if (bytes == NULL) {
- ts.Self()->ThrowOutOfMemoryError();
- return NULL;
- }
+ CHECK(bytes != NULL); // bionic aborts anyway.
const uint16_t* chars = s->GetCharArray()->GetData() + s->GetOffset();
ConvertUtf16ToModifiedUtf8(bytes, chars, s->GetLength());
bytes[byte_count] = '\0';