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

Issue 297293002: Change HungPluginTabHelper to listen for infobar changes through Observer style. (Closed)

Created:
6 years, 7 months ago by tfarina
Modified:
6 years, 6 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, droger
Visibility:
Public.

Description

Change HungPluginTabHelper to listen for infobar changes through Observer style. Test plan: 1) out/Debug/chrome --no-sandbox --ppapi-flash-path=/opt/google/chrome/PepperFlash/libpepflashplayer.so --ppapi-flash-version=`grep -i version /opt/google/chrome/PepperFlash/manifest.json | awk '{print $2}' | awk -F"\"" '{print $2}'` 2) Go to a site that has flash, e.g., http://www.flash-game.net/ 3) Open Task Manager, Shift+Esc 4) Search for "Plug-in: Shockwave Flash" in the list. 5) Select it and click on "End process" button. 6) Go to the website and observe the infobar. Another way to test it is: 1) Add an infinite loop into ppapi/examples/scripting/post_message.cc 2) Build ppapi_example_post_message 3) out/Debug/chrome --no-sandbox --register-pepper-plugins="/home/tfarina/chromium/src/out/Debug/lib/libppapi_example_post_message.so;application/x-ppapi-post-message-example" ppapi/examples/scripting/post_message.html BUG=354380 TEST=see above R=pkasting@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277292

Patch Set 1 #

Total comments: 4

Patch Set 2 : observer installed #

Total comments: 2

Patch Set 3 : review #

Total comments: 2

Patch Set 4 : count? NOT WORKING YET #

Patch Set 5 : . #

Patch Set 6 : reduce diff #

Patch Set 7 : reduce the diff even more #

Patch Set 8 : rm infobar_count #

Patch Set 9 : number of infobars #

Total comments: 12

Patch Set 10 : review #

Total comments: 8

Patch Set 11 : review fixes #

Patch Set 12 : ourself #

Patch Set 13 : dtor change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -23 lines) Patch
M chrome/browser/ui/hung_plugin_tab_helper.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/ui/hung_plugin_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +18 lines, -13 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
tfarina
Peter, I will need your advice here, in order to have a better fix. I ...
6 years, 7 months ago (2014-05-25 21:53:30 UTC) #1
Peter Kasting
https://codereview.chromium.org/297293002/diff/1/chrome/browser/ui/hung_plugin_tab_helper.cc File chrome/browser/ui/hung_plugin_tab_helper.cc (right): https://codereview.chromium.org/297293002/diff/1/chrome/browser/ui/hung_plugin_tab_helper.cc#newcode380 chrome/browser/ui/hung_plugin_tab_helper.cc:380: infobar_service->AddObserver(this); You should only be doing this if we're ...
6 years, 7 months ago (2014-05-26 21:16:11 UTC) #2
tfarina
Peter, could you take a look at patch set 2? thanks,
6 years, 6 months ago (2014-05-30 17:27:37 UTC) #3
Peter Kasting
https://codereview.chromium.org/297293002/diff/40001/chrome/browser/ui/hung_plugin_tab_helper.cc File chrome/browser/ui/hung_plugin_tab_helper.cc (right): https://codereview.chromium.org/297293002/diff/40001/chrome/browser/ui/hung_plugin_tab_helper.cc#newcode280 chrome/browser/ui/hung_plugin_tab_helper.cc:280: infobar_service->AddObserver(this); Why do we want to add an observer ...
6 years, 6 months ago (2014-05-30 18:05:48 UTC) #4
tfarina
Peter, feedback addressed. ptal.
6 years, 6 months ago (2014-05-30 18:45:21 UTC) #5
Peter Kasting
I feel like you're not thinking very hard about how to do this conversion. You ...
6 years, 6 months ago (2014-05-30 18:54:47 UTC) #6
tfarina
On Fri, May 30, 2014 at 3:54 PM, <pkasting@chromium.org> wrote: > I feel like you're ...
6 years, 6 months ago (2014-05-30 20:24:14 UTC) #7
tfarina
https://codereview.chromium.org/297293002/diff/60001/chrome/browser/ui/hung_plugin_tab_helper.cc File chrome/browser/ui/hung_plugin_tab_helper.cc (right): https://codereview.chromium.org/297293002/diff/60001/chrome/browser/ui/hung_plugin_tab_helper.cc#newcode400 chrome/browser/ui/hung_plugin_tab_helper.cc:400: infobar_service->RemoveObserver(this); On 2014/05/30 18:54:47, Peter Kasting wrote: > Also, ...
6 years, 6 months ago (2014-05-30 21:14:03 UTC) #8
Peter Kasting
On 2014/05/30 21:14:03, tfarina wrote: > https://codereview.chromium.org/297293002/diff/60001/chrome/browser/ui/hung_plugin_tab_helper.cc > File chrome/browser/ui/hung_plugin_tab_helper.cc (right): > > https://codereview.chromium.org/297293002/diff/60001/chrome/browser/ui/hung_plugin_tab_helper.cc#newcode400 > ...
6 years, 6 months ago (2014-05-30 21:25:43 UTC) #9
tfarina
I don't think we have a clean way to do this right now (my observer_installed_ ...
6 years, 6 months ago (2014-05-30 23:15:19 UTC) #10
Peter Kasting
On 2014/05/30 23:15:19, tfarina wrote: > I don't think we have a clean way to ...
6 years, 6 months ago (2014-05-30 23:21:40 UTC) #11
tfarina
On 2014/05/30 23:21:40, Peter Kasting wrote: > On 2014/05/30 23:15:19, tfarina wrote: > > I ...
6 years, 6 months ago (2014-05-30 23:53:01 UTC) #12
Peter Kasting
On 2014/05/30 23:53:01, tfarina wrote: > On 2014/05/30 23:21:40, Peter Kasting wrote: > > On ...
6 years, 6 months ago (2014-05-31 00:00:44 UTC) #13
tfarina
On 2014/05/31 00:00:44, Peter Kasting wrote: > On 2014/05/30 23:53:01, tfarina wrote: > > On ...
6 years, 6 months ago (2014-05-31 00:27:25 UTC) #14
Peter Kasting
On 2014/05/31 00:27:25, tfarina wrote: > On 2014/05/31 00:00:44, Peter Kasting wrote: > > On ...
6 years, 6 months ago (2014-05-31 00:28:51 UTC) #15
tfarina
On 2014/05/31 00:28:51, Peter Kasting wrote: > On 2014/05/31 00:27:25, tfarina wrote: > > On ...
6 years, 6 months ago (2014-05-31 01:18:27 UTC) #16
Peter Kasting
On 2014/05/31 01:18:27, tfarina wrote: > On 2014/05/31 00:28:51, Peter Kasting wrote: > > On ...
6 years, 6 months ago (2014-05-31 01:24:58 UTC) #17
tfarina
Peter, after some difficulties, I think it is ready for another look. I hope I ...
6 years, 6 months ago (2014-05-31 02:49:34 UTC) #18
Peter Kasting
OK, this is better. Not sure why you sent me a screenshot of the infobar ...
6 years, 6 months ago (2014-05-31 03:44:58 UTC) #19
tfarina
Peter, I made the changes you suggested. I removed OnManagerShuttingDown, because in my testing, from ...
6 years, 6 months ago (2014-06-03 03:47:12 UTC) #20
Peter Kasting
https://codereview.chromium.org/297293002/diff/250001/chrome/browser/ui/hung_plugin_tab_helper.cc File chrome/browser/ui/hung_plugin_tab_helper.cc (right): https://codereview.chromium.org/297293002/diff/250001/chrome/browser/ui/hung_plugin_tab_helper.cc#newcode266 chrome/browser/ui/hung_plugin_tab_helper.cc:266: DCHECK_EQ(0, number_of_infobars_); Are you sure we're guaranteed that the ...
6 years, 6 months ago (2014-06-03 18:41:45 UTC) #21
tfarina
Finally got some time to debug it. Please, see below. https://codereview.chromium.org/297293002/diff/250001/chrome/browser/ui/hung_plugin_tab_helper.cc File chrome/browser/ui/hung_plugin_tab_helper.cc (right): https://codereview.chromium.org/297293002/diff/250001/chrome/browser/ui/hung_plugin_tab_helper.cc#newcode265 ...
6 years, 6 months ago (2014-06-07 05:26:22 UTC) #22
tfarina
https://codereview.chromium.org/297293002/diff/250001/chrome/browser/ui/hung_plugin_tab_helper.h File chrome/browser/ui/hung_plugin_tab_helper.h (right): https://codereview.chromium.org/297293002/diff/250001/chrome/browser/ui/hung_plugin_tab_helper.h#newcode82 chrome/browser/ui/hung_plugin_tab_helper.h:82: // should remove ourselves as an observer of InfoBarManager ...
6 years, 6 months ago (2014-06-07 05:27:47 UTC) #23
Peter Kasting
Your backtrace only tells me that the HungPluginTabHelper is torn down during WebContents destruction. It ...
6 years, 6 months ago (2014-06-09 00:30:18 UTC) #24
tfarina
Peter, the bt for InfoBarManager is: #0 infobars::InfoBarManager::~InfoBarManager (this=0x870c75822f0) at ../../components/infobars/core/infobar_manager.cc:105 #1 0x0000555555b09e72 in InfoBarService::~InfoBarService ...
6 years, 6 months ago (2014-06-09 02:00:40 UTC) #25
Peter Kasting
On 2014/06/09 02:00:40, tfarina wrote: > So whether it can be destroyed before or after ...
6 years, 6 months ago (2014-06-09 18:15:02 UTC) #26
tfarina
Peter, thanks for the patience with me in this review. Change addressed. Pushing to CQ. ...
6 years, 6 months ago (2014-06-14 23:01:47 UTC) #27
tfarina
The CQ bit was checked by tfarina@chromium.org
6 years, 6 months ago (2014-06-14 23:01:54 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tfarina@chromium.org/297293002/310001
6 years, 6 months ago (2014-06-14 23:02:15 UTC) #29
commit-bot: I haz the power
Change committed as 277292
6 years, 6 months ago (2014-06-15 03:07:29 UTC) #30
tfarina
6 years, 6 months ago (2014-06-17 17:50:02 UTC) #31
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/338353003/ by tfarina@chromium.org.

The reason for reverting is: Caused a crash on Windows. See crbug.com/354380.

Powered by Google App Engine
This is Rietveld 408576698