Index: gpu/command_buffer/service/query_manager.cc |
diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc |
index ffb54cca5142a635d692d955f547c9620322ca73..a8b47f192df3460565405ea7e7325f4561abe183 100644 |
--- a/gpu/command_buffer/service/query_manager.cc |
+++ b/gpu/command_buffer/service/query_manager.cc |
@@ -88,7 +88,7 @@ bool AsyncPixelTransfersCompletedQuery::End( |
// use-after-free of the memory. |
scoped_refptr<Buffer> buffer = |
manager()->decoder()->GetSharedMemoryBuffer(shm_id()); |
- if (!buffer) |
+ if (!buffer.get()) |
return false; |
AsyncMemoryParams mem_params(buffer, shm_offset(), sizeof(QuerySync)); |
if (!mem_params.GetDataAddress()) |
@@ -99,8 +99,8 @@ bool AsyncPixelTransfersCompletedQuery::End( |
// Ask AsyncPixelTransferDelegate to run completion callback after all |
// previous async transfers are done. No guarantee that callback is run |
// on the current thread. |
- manager()->decoder()->GetAsyncPixelTransferManager() |
- ->AsyncNotifyCompletion(mem_params, observer_); |
+ manager()->decoder()->GetAsyncPixelTransferManager()->AsyncNotifyCompletion( |
+ mem_params, observer_.get()); |
return AddToPendingTransferQueue(submit_count); |
} |
@@ -128,7 +128,7 @@ void AsyncPixelTransfersCompletedQuery::Destroy(bool /* have_context */) { |
} |
AsyncPixelTransfersCompletedQuery::~AsyncPixelTransfersCompletedQuery() { |
- if (observer_) |
+ if (observer_.get()) |
observer_->Cancel(); |
} |