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

Issue 307453010: Fix a crash when chooseDesktopMedia is called with no target tab (Closed)

Created:
6 years, 6 months ago by tbarzic
Modified:
6 years, 6 months ago
Reviewers:
Sergey Ulanov, zel, sky
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Fix a crash when chooseDesktopMedia is called with no target tab DesktopMediaPicker was getting created with web_contents returned by web_contents(), which is part of WebContentsObserver interface, and which does not get set when the target tab is not specified. Also, fix handling of a case when the method is called when there are no web contents to attach the picker dialog to. BUG=375576, 364050 TEST=from a extension with desktopCapture permission: chrome.desktopCapture.chooseDesktopMedia(['screen'], undefined, function()) does not crash Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=274771

Patch Set 1 #

Total comments: 3

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 1

Patch Set 4 : . #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -17 lines) Patch
M chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc View 1 6 chunks +17 lines, -6 lines 2 comments Download
M chrome/browser/ui/views/desktop_media_picker_views.cc View 1 2 3 2 chunks +25 lines, -11 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
tbarzic
6 years, 6 months ago (2014-05-28 03:05:22 UTC) #1
zel
On 2014/05/28 03:05:22, tbarzic wrote: Are there any other repro steps here other than this ...
6 years, 6 months ago (2014-05-28 03:09:25 UTC) #2
tbarzic
On 2014/05/28 03:09:25, zel wrote: > On 2014/05/28 03:05:22, tbarzic wrote: > > Are there ...
6 years, 6 months ago (2014-05-28 03:17:41 UTC) #3
zel
On 2014/05/28 03:17:41, tbarzic wrote: > On 2014/05/28 03:09:25, zel wrote: > > On 2014/05/28 ...
6 years, 6 months ago (2014-05-28 03:41:40 UTC) #4
tbarzic
On 2014/05/28 03:41:40, zel wrote: > On 2014/05/28 03:17:41, tbarzic wrote: > > On 2014/05/28 ...
6 years, 6 months ago (2014-05-28 03:49:18 UTC) #5
zel
https://codereview.chromium.org/307453010/diff/1/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc (right): https://codereview.chromium.org/307453010/diff/1/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode142 chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc:142: error_ = kNoTabsAvailableError; I still think we could support ...
6 years, 6 months ago (2014-05-28 04:06:34 UTC) #6
Sergey Ulanov
Toni, thanks for fixing this issue. I think ideally we should also support the case ...
6 years, 6 months ago (2014-06-01 01:31:38 UTC) #7
tbarzic
https://codereview.chromium.org/307453010/diff/1/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc (right): https://codereview.chromium.org/307453010/diff/1/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode142 chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc:142: error_ = kNoTabsAvailableError; On 2014/06/01 01:31:38, Sergey Ulanov wrote: ...
6 years, 6 months ago (2014-06-03 01:18:51 UTC) #8
Sergey Ulanov
On 2014/06/03 01:18:51, tbarzic wrote: > https://codereview.chromium.org/307453010/diff/1/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc > File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc > (right): > > https://codereview.chromium.org/307453010/diff/1/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode142 ...
6 years, 6 months ago (2014-06-03 01:21:26 UTC) #9
Sergey Ulanov
please add BUG=364050. LGTM. Thanks for fixing it! https://codereview.chromium.org/307453010/diff/40001/chrome/browser/ui/views/desktop_media_picker_views.cc File chrome/browser/ui/views/desktop_media_picker_views.cc (right): https://codereview.chromium.org/307453010/diff/40001/chrome/browser/ui/views/desktop_media_picker_views.cc#newcode522 chrome/browser/ui/views/desktop_media_picker_views.cc:522: if ...
6 years, 6 months ago (2014-06-03 01:27:29 UTC) #10
tbarzic
+sky as an owner
6 years, 6 months ago (2014-06-03 20:34:11 UTC) #11
zel
lgtm
6 years, 6 months ago (2014-06-03 21:11:36 UTC) #12
sky
https://codereview.chromium.org/307453010/diff/60001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc (right): https://codereview.chromium.org/307453010/diff/60001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode147 chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc:147: parent_window = ash::Shell::GetPrimaryRootWindow(); Why is the primary root the ...
6 years, 6 months ago (2014-06-03 22:07:20 UTC) #13
tbarzic
https://codereview.chromium.org/307453010/diff/60001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc File chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc (right): https://codereview.chromium.org/307453010/diff/60001/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc#newcode147 chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc:147: parent_window = ash::Shell::GetPrimaryRootWindow(); On 2014/06/03 22:07:20, sky wrote: > ...
6 years, 6 months ago (2014-06-03 22:25:33 UTC) #14
sky
ic, LGTM then
6 years, 6 months ago (2014-06-03 23:09:09 UTC) #15
tbarzic
The CQ bit was checked by tbarzic@chromium.org
6 years, 6 months ago (2014-06-04 00:10:02 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tbarzic@chromium.org/307453010/60001
6 years, 6 months ago (2014-06-04 00:10:44 UTC) #17
commit-bot: I haz the power
6 years, 6 months ago (2014-06-04 11:20:26 UTC) #18
Message was sent while issue was closed.
Change committed as 274771

Powered by Google App Engine
This is Rietveld 408576698