diff options
author | Ian Rogers <irogers@google.com> | 2014-05-14 19:09:45 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-05-14 19:09:45 +0000 |
commit | cbfb8b2f30de46632d3499a838661765451845c5 (patch) | |
tree | 1c1e2bacb0dd16a7bb22cf26cbd7ad84d6a7f370 /runtime/mirror | |
parent | 6099df8c0695a81a8f25c47ff801998b12d09d1b (diff) | |
parent | 2d10b206f9d0b97396b7dadb9a6415cd39efd341 (diff) | |
download | art-cbfb8b2f30de46632d3499a838661765451845c5.tar.gz art-cbfb8b2f30de46632d3499a838661765451845c5.tar.bz2 art-cbfb8b2f30de46632d3499a838661765451845c5.zip |
Merge "Ensure JNI primitive array type is appropriate."
Diffstat (limited to 'runtime/mirror')
-rw-r--r-- | runtime/mirror/array.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h index 238506e86d..1b8106e05f 100644 --- a/runtime/mirror/array.h +++ b/runtime/mirror/array.h @@ -155,14 +155,19 @@ class MANAGED PrimitiveArray : public Array { SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); static void SetArrayClass(Class* array_class) { - CHECK(array_class_ == NULL); - CHECK(array_class != NULL); + CHECK(array_class_ == nullptr); + CHECK(array_class != nullptr); array_class_ = array_class; } + static Class* GetArrayClass() { + DCHECK(array_class_ != nullptr); + return array_class_; + } + static void ResetArrayClass() { - CHECK(array_class_ != NULL); - array_class_ = NULL; + CHECK(array_class_ != nullptr); + array_class_ = nullptr; } static void VisitRoots(RootCallback* callback, void* arg) |