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

Issue 801823002: Fix segfault when unplugging captured external display (Closed)

Created:
6 years ago by robert.bradford
Modified:
6 years ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix segfault when unplugging captured external display When unplugging an external display the WindowTreeHost is destroyed, destroying the window and stopping the capture. However the compositor is destroyed before the window in the WindowTreeHost destructor. This change add an extra check that the compositor is valid before dereferencing. BUG=441747 TEST=on link_freon unplugging external display does not result in crash when running desktopCapture example against the external display Committed: https://crrev.com/8a684dcb40f100ed6e02f9b0170ad4b0794a54ae Cr-Commit-Position: refs/heads/master@{#308168}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address nits #

Total comments: 1

Patch Set 3 : Rename variable to more descriptive name #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M content/browser/media/capture/desktop_capture_device_aura.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (2 generated)
robert.bradford
Hi Sergey, PTAL at this crasher fix. Thanks.
6 years ago (2014-12-12 14:15:29 UTC) #2
Sergey Ulanov
looks good, I have just couple minor nits. https://codereview.chromium.org/801823002/diff/1/content/browser/media/capture/desktop_capture_device_aura.cc File content/browser/media/capture/desktop_capture_device_aura.cc (right): https://codereview.chromium.org/801823002/diff/1/content/browser/media/capture/desktop_capture_device_aura.cc#newcode238 content/browser/media/capture/desktop_capture_device_aura.cc:238: // ...
6 years ago (2014-12-12 17:42:34 UTC) #3
robert.bradford
Hi Sergey, PTAL, i've addressed the nits you outlined. Thanks.
6 years ago (2014-12-12 18:31:39 UTC) #4
Sergey Ulanov
https://codereview.chromium.org/801823002/diff/20001/content/browser/media/capture/desktop_capture_device_aura.cc File content/browser/media/capture/desktop_capture_device_aura.cc (right): https://codereview.chromium.org/801823002/diff/20001/content/browser/media/capture/desktop_capture_device_aura.cc#newcode238 content/browser/media/capture/desktop_capture_device_aura.cc:238: aura::WindowTreeHost* wth = desktop_window_->GetHost(); Please use a more descriptive ...
6 years ago (2014-12-12 18:46:53 UTC) #5
robert.bradford
Thanks, that's good feedback. I've uploaded a changed version.
6 years ago (2014-12-12 19:05:28 UTC) #6
Sergey Ulanov
LGTM. Thank you for fixing it!
6 years ago (2014-12-12 19:27:54 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/801823002/40001
6 years ago (2014-12-12 19:33:44 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years ago (2014-12-12 21:42:21 UTC) #10
commit-bot: I haz the power
6 years ago (2014-12-12 21:43:00 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/8a684dcb40f100ed6e02f9b0170ad4b0794a54ae
Cr-Commit-Position: refs/heads/master@{#308168}

Powered by Google App Engine
This is Rietveld 408576698