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

Issue 218673002: Fix video capture bug in a utility function, GetPin, and how it was being used. (Closed)

Created:
6 years, 8 months ago by tommi (sloooow) - chröme
Modified:
6 years, 8 months ago
Reviewers:
mcasas, DaleCurtis
CC:
chromium-reviews, fischman+watch_chromium.org, feature-media-reviews_chromium.org, wjia+watch_chromium.org, mcasas+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Fix video capture bug in a utility function, GetPin, and how it was being used. This function could set an outgoing pointer to an already-released COM object, and then (correctly) return an error. At the call sites though, the return value was not being checked, but instead the pointer was checked. The worst part (and this is really the bug) about this was that if the pointer was valid on return, we would always call Release() on it, and that caused us to attempt to release an already-released object. BUG=354027 TBR=mcasas Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260467

Patch Set 1 #

Patch Set 2 : Change GetPin to just return the object since the return value wasn't being used #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -18 lines) Patch
M media/video/capture/win/video_capture_device_win.cc View 1 4 chunks +17 lines, -18 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
tommi (sloooow) - chröme
Change GetPin to just return the object since the return value wasn't being used
6 years, 8 months ago (2014-03-30 15:42:18 UTC) #1
tommi (sloooow) - chröme
6 years, 8 months ago (2014-03-30 15:44:40 UTC) #2
tommi (sloooow) - chröme
TBR-ing and sending to the cq since it fixes a frequent crash.
6 years, 8 months ago (2014-03-30 15:48:31 UTC) #3
tommi (sloooow) - chröme
The CQ bit was checked by tommi@chromium.org
6 years, 8 months ago (2014-03-30 15:48:35 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommi@chromium.org/218673002/10001
6 years, 8 months ago (2014-03-30 15:48:51 UTC) #5
commit-bot: I haz the power
Change committed as 260467
6 years, 8 months ago (2014-03-30 20:51:11 UTC) #6
DaleCurtis
6 years, 8 months ago (2014-03-31 17:21:18 UTC) #7
Message was sent while issue was closed.
Good catch, I wonder if other ScopedComPtr instances have similar failure modes.

Powered by Google App Engine
This is Rietveld 408576698