diff options
author | 2016-11-03 13:06:25 -0700 | |
---|---|---|
committer | 2016-11-03 14:07:56 -0700 | |
commit | 38cea84b362a10859580e788e984324f36272817 (patch) | |
tree | cf232431a9139116ea09b451aa9abbc98b8d8462 /runtime/monitor_test.cc | |
parent | 47b6bdb2a06cc4c296762c7461281f4390e17c2d (diff) |
ART: Make Handle trivially-copyable
Use default copy constructor and copy assignment to make Handle
trivially copyable. Do the same for MutableHandle.
Fix up unused Handle warnings. Add asserts in the HandleScope
test.
Bug: 32619234
Test: m test-art-host
Change-Id: I151f0bdbeeb131a6fc5c44610f345663ebe96c09
Diffstat (limited to 'runtime/monitor_test.cc')
-rw-r--r-- | runtime/monitor_test.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/monitor_test.cc b/runtime/monitor_test.cc index 4ee46dcdff..4fbfe4781c 100644 --- a/runtime/monitor_test.cc +++ b/runtime/monitor_test.cc @@ -401,14 +401,11 @@ TEST_F(MonitorTest, TestTryLock) { Thread* const self = Thread::Current(); ThreadPool thread_pool("the pool", 2); ScopedObjectAccess soa(self); - StackHandleScope<3> hs(self); + StackHandleScope<1> hs(self); Handle<mirror::Object> obj1( hs.NewHandle<mirror::Object>(mirror::String::AllocFromModifiedUtf8(self, "hello, world!"))); - Handle<mirror::Object> obj2( - hs.NewHandle<mirror::Object>(mirror::String::AllocFromModifiedUtf8(self, "hello, world!"))); { ObjectLock<mirror::Object> lock1(self, obj1); - ObjectLock<mirror::Object> lock2(self, obj1); { ObjectTryLock<mirror::Object> trylock(self, obj1); EXPECT_TRUE(trylock.Acquired()); |