Bug 891445 - Fix incorrect pointer comparison. r=doublec, a=leo+
authorSotaro Ikeda <sikeda@mozilla.com>
Fri, 12 Jul 2013 17:27:17 -0400
changeset 119741 f21152a848da
parent 119740 6433412c2d95
child 119742 3af62b060f36
push id964
push userryanvm@gmail.com
push date2013-07-13 00:54 +0000
reviewersdoublec, leo
bugs891445
milestone18.1
Bug 891445 - Fix incorrect pointer comparison. r=doublec, a=leo+
content/media/omx/mediaresourcemanager/MediaResourceManagerService.cpp
--- a/content/media/omx/mediaresourcemanager/MediaResourceManagerService.cpp
+++ b/content/media/omx/mediaresourcemanager/MediaResourceManagerService.cpp
@@ -154,26 +154,26 @@ void MediaResourceManagerService::onMess
   client->statusChanged(MediaResourceManagerClient::CLIENT_STATE_RESOURCE_ASSIGNED);
 }
 
 void MediaResourceManagerService::cancelClientLocked(const sp<IBinder>& binder)
 {
   // Clear the request from request queue.
   Fifo::iterator it(mVideoCodecRequestQueue.begin());
   while (it != mVideoCodecRequestQueue.end()) {
-    if (*it == binder) {
+    if ((*it).get() == binder.get()) {
       it = mVideoCodecRequestQueue.erase(it);
       continue;
     }
     it++;
   }
 
   // Clear the client from the resource
   for (int i=0 ; i<mVideoDecoderCount ; i++) {
-    if (mVideoDecoderSlots[i].mClient == binder) {
+    if (mVideoDecoderSlots[i].mClient.get() == binder.get()) {
       mVideoDecoderSlots[i].mClient = NULL;
     }
   }
   binder->unlinkToDeath(this);
 }
 
 }; // namespace android