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

Issue 188383004: Mac AVFoundation: clean removal of device observers (Closed)

Created:
6 years, 9 months ago by mcasas
Modified:
6 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, tommi (sloooow) - chröme, bemasc
Visibility:
Public.

Description

Mac AVFoundation device monitor: clean removal of device observers This CL fixes a crash happening when Chrome shuts down or a capture device is removed from the system while there are observers observing the "suspended" property of the AVCaptureDevice going out of scope -- basically leaving the observer observing a zombie. For that, the CrAVFoundationSuspendObserver registers to observe both "suspended" and "connected". In the case of "connected" received, it can only mean disconnected, so both observers are removed. The |device| pointer is passed to -addObserver:forKeyPath:options:context: as the |context|, and is received then in the -observeValueForKeyPath:... . CrAVFoundationSuspendObserver renamed to CrAVFoundationDeviceObserver. BUG=288562, 348917 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255648

Patch Set 1 #

Total comments: 4

Patch Set 2 : rsesek@ comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -7 lines) Patch
M content/browser/device_monitor_mac.mm View 1 6 chunks +15 lines, -7 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
mcasas
rsesek@ PTAL. avi@ OWNERS stamp please.
6 years, 9 months ago (2014-03-06 10:55:46 UTC) #1
Robert Sesek
https://codereview.chromium.org/188383004/diff/1/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): https://codereview.chromium.org/188383004/diff/1/content/browser/device_monitor_mac.mm#newcode331 content/browser/device_monitor_mac.mm:331: if ([keyPath isEqual:@"connected"]) { nit: you don't have braces ...
6 years, 9 months ago (2014-03-06 17:08:20 UTC) #2
mcasas
rsesek@ PTAL. https://codereview.chromium.org/188383004/diff/1/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): https://codereview.chromium.org/188383004/diff/1/content/browser/device_monitor_mac.mm#newcode331 content/browser/device_monitor_mac.mm:331: if ([keyPath isEqual:@"connected"]) { On 2014/03/06 17:08:20, ...
6 years, 9 months ago (2014-03-06 17:21:58 UTC) #3
Robert Sesek
lgtm
6 years, 9 months ago (2014-03-06 17:40:27 UTC) #4
mcasas
avi@ ping.
6 years, 9 months ago (2014-03-07 07:05:47 UTC) #5
Avi (use Gerrit)
lgtm
6 years, 9 months ago (2014-03-07 14:14:32 UTC) #6
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 9 months ago (2014-03-07 14:19:19 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/188383004/120001
6 years, 9 months ago (2014-03-07 14:20:04 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-07 14:22:35 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-03-07 14:22:36 UTC) #10
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 9 months ago (2014-03-07 14:55:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/188383004/120001
6 years, 9 months ago (2014-03-07 14:57:18 UTC) #12
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 17:24:16 UTC) #13
Message was sent while issue was closed.
Change committed as 255648

Powered by Google App Engine
This is Rietveld 408576698