OSDN Git Service
(root)
/
android-x86
/
art.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a07557c
)
Add exception check to AllocateInternalWithGc
author
Mathieu Chartier
<mathieuc@google.com>
Wed, 3 Sep 2014 18:21:08 +0000
(11:21 -0700)
committer
Mathieu Chartier
<mathieuc@google.com>
Thu, 4 Sep 2014 02:29:27 +0000
(19:29 -0700)
Trying to figure out if the pending exception comes before or during
AllocateInternalWithGc.
Bug:
17164348
(cherry picked from commit
98d43cb0da3c34d1888d1e31d953c2940fd0f897
)
Change-Id: I2aac4b67f0c3f1c0fe3c9dc321316f76494c4074
runtime/gc/heap.cc
patch
|
blob
|
history
diff --git
a/runtime/gc/heap.cc
b/runtime/gc/heap.cc
index
d9d1e31
..
78ef7ac
100644
(file)
--- a/
runtime/gc/heap.cc
+++ b/
runtime/gc/heap.cc
@@
-1210,6
+1210,8
@@
mirror::Object* Heap::AllocateInternalWithGc(Thread* self, AllocatorType allocat
size_t* usable_size,
mirror::Class** klass) {
bool was_default_allocator = allocator == GetCurrentAllocator();
+ // Make sure there is no pending exception since we may need to throw an OOME.
+ self->AssertNoPendingException();
DCHECK(klass != nullptr);
StackHandleScope<1> hs(self);
HandleWrapper<mirror::Class> h(hs.NewHandleWrapper(klass));