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

Issue 2650923002: Fixes ungraceful handling of destroyed GlobalError GlobalErrorBubbleView. (Closed)

Created:
3 years, 11 months ago by CJ
Modified:
3 years, 10 months ago
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixes ungraceful handling of destroyed GlobalError GlobalErrorBubbleView. This CL fixes incorrect handling of destroyed GlobalError |error_| in GlobalErrorBubbleView. The code should now account for cases in which the |error_| is null. Unit tests have been added to reinforce this, check for access of |error_| and for behavior when |error_| is null. BUG=672344 Review-Url: https://codereview.chromium.org/2650923002 Cr-Commit-Position: refs/heads/master@{#449727} Committed: https://chromium.googlesource.com/chromium/src/+/40d0dc39f4bfaf7bdf919ce98dfdfab1e6eeb38b

Patch Set 1 #

Total comments: 19

Patch Set 2 : Addresses Wez's #6 comments. #

Total comments: 2

Patch Set 3 : Addresses Wez's and sky's comments. #

Total comments: 7

Patch Set 4 : Addresses sky's #18 comments. #

Patch Set 5 : Fixes some of the build issues. #

Patch Set 6 : Updates BUILD to correct compilation issues. #

Patch Set 7 : Tries to fix build error. #

Patch Set 8 : Fix leak. #

Patch Set 9 : Fix more leaks. #

Patch Set 10 : Lint. #

Patch Set 11 : Use fake instead of mock button listener #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -11 lines) Patch
M chrome/browser/ui/global_error/global_error.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/global_error_bubble_view.cc View 1 2 5 chunks +28 lines, -10 lines 0 comments Download
A chrome/browser/ui/views/global_error_bubble_view_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +172 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 53 (23 generated)
CJ
3 years, 11 months ago (2017-01-24 01:18:18 UTC) #2
Wez
Thanks for fixing this! Some CL description suggestions: - The CL description focuses on unit-tests, ...
3 years, 11 months ago (2017-01-24 01:28:11 UTC) #3
CJ
On 2017/01/24 01:28:11, Wez wrote: > Thanks for fixing this! Some CL description suggestions: > ...
3 years, 11 months ago (2017-01-24 01:40:46 UTC) #5
Wez
https://codereview.chromium.org/2650923002/diff/1/chrome/browser/ui/views/global_error_bubble_view.cc File chrome/browser/ui/views/global_error_bubble_view.cc (right): https://codereview.chromium.org/2650923002/diff/1/chrome/browser/ui/views/global_error_bubble_view.cc#newcode77 chrome/browser/ui/views/global_error_bubble_view.cc:77: if (error_) { nit: I'd recommend using an early-exit ...
3 years, 11 months ago (2017-01-24 01:45:55 UTC) #6
CJ
https://codereview.chromium.org/2650923002/diff/1/chrome/browser/ui/views/global_error_bubble_view.cc File chrome/browser/ui/views/global_error_bubble_view.cc (right): https://codereview.chromium.org/2650923002/diff/1/chrome/browser/ui/views/global_error_bubble_view.cc#newcode77 chrome/browser/ui/views/global_error_bubble_view.cc:77: if (error_) { On 2017/01/24 01:45:55, Wez wrote: > ...
3 years, 11 months ago (2017-01-25 01:11:21 UTC) #7
CJ
https://codereview.chromium.org/2650923002/diff/1/chrome/browser/ui/views/global_error_bubble_view_unittest.cc File chrome/browser/ui/views/global_error_bubble_view_unittest.cc (right): https://codereview.chromium.org/2650923002/diff/1/chrome/browser/ui/views/global_error_bubble_view_unittest.cc#newcode108 chrome/browser/ui/views/global_error_bubble_view_unittest.cc:108: EXPECT_CALL(*mock_global_error_with_standard_bubble_, GetBubbleViewTitle()); On 2017/01/24 01:45:55, Wez wrote: > For ...
3 years, 11 months ago (2017-01-25 01:12:14 UTC) #8
Wez
nit: Description still mentions "weak_pointer"; using unix_hacker_style implies you're talking about a variable name, but ...
3 years, 10 months ago (2017-01-26 18:30:20 UTC) #9
Wez
LGTM w/ a few remaining nits. Thanks again for fixing this, and adding the test. ...
3 years, 10 months ago (2017-01-26 18:34:09 UTC) #10
sky
Can you elaborate when error_ is destroyed? It seems to me there is no point ...
3 years, 10 months ago (2017-01-26 19:06:07 UTC) #11
CJ
On 2017/01/26 18:30:20, Wez wrote: > nit: Description still mentions "weak_pointer"; using unix_hacker_style implies > ...
3 years, 10 months ago (2017-01-26 19:25:16 UTC) #13
CJ
+avi. Avi, do you think we could make |error_| a regular ptr. We could null ...
3 years, 10 months ago (2017-01-27 00:44:05 UTC) #15
Avi (use Gerrit)
GlobalErrorBubbleView::ShouldShowCloseButton already assumes that error_ can be null. Otherwise I'm not sure; I did some ...
3 years, 10 months ago (2017-02-03 19:46:28 UTC) #16
sky
On 2017/02/03 19:46:28, Avi wrote: > GlobalErrorBubbleView::ShouldShowCloseButton already assumes that error_ can be > null. ...
3 years, 10 months ago (2017-02-04 22:16:24 UTC) #17
sky
https://codereview.chromium.org/2650923002/diff/40001/chrome/browser/ui/views/global_error_bubble_view_unittest.cc File chrome/browser/ui/views/global_error_bubble_view_unittest.cc (right): https://codereview.chromium.org/2650923002/diff/40001/chrome/browser/ui/views/global_error_bubble_view_unittest.cc#newcode1 chrome/browser/ui/views/global_error_bubble_view_unittest.cc:1: // Copyright (c) 2017 The Chromium Authors. All rights ...
3 years, 10 months ago (2017-02-04 22:16:31 UTC) #18
Wez
On 2017/02/04 22:16:24, sky wrote: > *SIGH* I think this is wrong and that we ...
3 years, 10 months ago (2017-02-06 21:13:46 UTC) #19
sky
I'm not sure there is a good owner. I know Sailesh had worked on this ...
3 years, 10 months ago (2017-02-06 21:25:58 UTC) #20
CJ
https://codereview.chromium.org/2650923002/diff/40001/chrome/browser/ui/views/global_error_bubble_view_unittest.cc File chrome/browser/ui/views/global_error_bubble_view_unittest.cc (right): https://codereview.chromium.org/2650923002/diff/40001/chrome/browser/ui/views/global_error_bubble_view_unittest.cc#newcode1 chrome/browser/ui/views/global_error_bubble_view_unittest.cc:1: // Copyright (c) 2017 The Chromium Authors. All rights ...
3 years, 10 months ago (2017-02-06 23:54:50 UTC) #21
Avi (use Gerrit)
https://codereview.chromium.org/2650923002/diff/40001/chrome/browser/ui/views/global_error_bubble_view_unittest.cc File chrome/browser/ui/views/global_error_bubble_view_unittest.cc (right): https://codereview.chromium.org/2650923002/diff/40001/chrome/browser/ui/views/global_error_bubble_view_unittest.cc#newcode1 chrome/browser/ui/views/global_error_bubble_view_unittest.cc:1: // Copyright (c) 2017 The Chromium Authors. All rights ...
3 years, 10 months ago (2017-02-07 00:11:46 UTC) #22
sky
LGTM
3 years, 10 months ago (2017-02-07 00:30:38 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650923002/60001
3 years, 10 months ago (2017-02-07 00:56:34 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/113656)
3 years, 10 months ago (2017-02-07 01:30:29 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650923002/100001
3 years, 10 months ago (2017-02-08 00:12:58 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/306693)
3 years, 10 months ago (2017-02-08 01:22:38 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650923002/160001
3 years, 10 months ago (2017-02-09 20:26:46 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/116037)
3 years, 10 months ago (2017-02-09 21:17:56 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650923002/160001
3 years, 10 months ago (2017-02-09 21:29:35 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/345824)
3 years, 10 months ago (2017-02-09 22:09:33 UTC) #46
dcheng
On 2017/02/09 22:09:33, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 10 months ago (2017-02-10 19:12:51 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650923002/200001
3 years, 10 months ago (2017-02-10 19:29:37 UTC) #50
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 20:53:39 UTC) #53
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/40d0dc39f4bfaf7bdf919ce98dfd...

Powered by Google App Engine
This is Rietveld 408576698