ART: Add operator == and != with nullptr to Handle
Get it in line with ObjPtr and prettify our code.
Test: m
Change-Id: I1322e2a9bc7a85d7f2441034a19bf4d807b81a0e
diff --git a/runtime/object_lock.cc b/runtime/object_lock.cc
index 39ab52f..f6db544 100644
--- a/runtime/object_lock.cc
+++ b/runtime/object_lock.cc
@@ -24,7 +24,7 @@
template <typename T>
ObjectLock<T>::ObjectLock(Thread* self, Handle<T> object) : self_(self), obj_(object) {
- CHECK(object.Get() != nullptr);
+ CHECK(object != nullptr);
obj_->MonitorEnter(self_);
}
@@ -50,7 +50,7 @@
template <typename T>
ObjectTryLock<T>::ObjectTryLock(Thread* self, Handle<T> object) : self_(self), obj_(object) {
- CHECK(object.Get() != nullptr);
+ CHECK(object != nullptr);
acquired_ = obj_->MonitorTryEnter(self_) != nullptr;
}