Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1044)

Unified Diff: content/renderer/pepper/pepper_video_decoder_host.cc

Issue 2705073003: Remove ScopedVector from content/renderer/. (Closed)
Patch Set: Rebase only Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_video_decoder_host.cc
diff --git a/content/renderer/pepper/pepper_video_decoder_host.cc b/content/renderer/pepper/pepper_video_decoder_host.cc
index ca396610d343f63d611f69cbea5d73671f9f16dc..3aea65f00caebf154c86a8251d8038752ba5ac67 100644
--- a/content/renderer/pepper/pepper_video_decoder_host.cc
+++ b/content/renderer/pepper/pepper_video_decoder_host.cc
@@ -204,13 +204,10 @@ int32_t PepperVideoDecoderHost::OnHostMsgGetShm(
base::SharedMemoryHandle shm_handle = shm->handle();
if (shm_id == shm_buffers_.size()) {
- shm_buffers_.push_back(shm.release());
+ shm_buffers_.push_back(std::move(shm));
shm_buffer_busy_.push_back(false);
} else {
- // Remove the old buffer. Delete manually since ScopedVector won't delete
- // the existing element if we just assign over it.
- delete shm_buffers_[shm_id];
- shm_buffers_[shm_id] = shm.release();
+ shm_buffers_[shm_id] = std::move(shm);
}
SerializedHandle handle(
« no previous file with comments | « content/renderer/pepper/pepper_video_decoder_host.h ('k') | content/renderer/pepper/pepper_video_encoder_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698