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

Issue 1232603002: This patch improves the way that GuestViewManager tracks the destruction of GuestView embedders. (Closed)

Created:
5 years, 5 months ago by paulmeyer
Modified:
5 years, 5 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This patch improves the way that GuestViewManager tracks the destruction of GuestView embedders. A RenderProcessHostObserver is now used instead of a WebContentsObserver. There were two main problems with the existing method that are now fixed: 1) The WebContentsObserver would only notify if an embedder crashed, and did nothingwhen it closed normally. (this led to the WebView in the chrome sign-in page not getting cleaned up properly when navigating away from that page) 2) The WebContentsObserver was created in GuestViewBase, so it would not even exist if a GuestView's embedder crashed before its GuestViewBase instance was created. BUG=355360 Committed: https://crrev.com/bc4600abb6ba65953c6cefd139062e21f0b64977 Cr-Commit-Position: refs/heads/master@{#339658}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed comment by fsamuel@. #

Total comments: 2

Patch Set 3 : Addressed comment. Now using weak pointer to GuestViewManager. #

Total comments: 2

Patch Set 4 : Rebased. #

Patch Set 5 : Fix for failing tests. #

Total comments: 1

Patch Set 6 : Addressed comment by kalman@. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -48 lines) Patch
M components/guest_view/browser/guest_view_base.h View 1 chunk +3 lines, -1 line 0 comments Download
M components/guest_view/browser/guest_view_base.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M components/guest_view/browser/guest_view_manager.h View 1 2 7 chunks +24 lines, -3 lines 0 comments Download
M components/guest_view/browser/guest_view_manager.cc View 1 2 3 4 6 chunks +72 lines, -17 lines 0 comments Download
M components/guest_view/browser/test_guest_view_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M components/guest_view/browser/test_guest_view_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/browser/api/declarative/rules_registry_service.h View 1 2 3 4 5 1 chunk +7 lines, -1 line 0 comments Download
M extensions/browser/api/declarative/rules_registry_service.cc View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M extensions/browser/browser_context_keyed_api_factory.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.h View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 1 2 3 4 5 2 chunks +9 lines, -16 lines 0 comments Download

Messages

Total messages: 31 (14 generated)
paulmeyer
5 years, 5 months ago (2015-07-10 15:19:09 UTC) #3
Fady Samuel
https://codereview.chromium.org/1232603002/diff/20001/components/guest_view/browser/guest_view_manager.cc File components/guest_view/browser/guest_view_manager.cc (right): https://codereview.chromium.org/1232603002/diff/20001/components/guest_view/browser/guest_view_manager.cc#newcode364 components/guest_view/browser/guest_view_manager.cc:364: embedder_render_process_host_observers_.push_back( When do you remove an observer? I would ...
5 years, 5 months ago (2015-07-10 15:24:01 UTC) #5
paulmeyer
fsamuel@: ptal. https://codereview.chromium.org/1232603002/diff/20001/components/guest_view/browser/guest_view_manager.cc File components/guest_view/browser/guest_view_manager.cc (right): https://codereview.chromium.org/1232603002/diff/20001/components/guest_view/browser/guest_view_manager.cc#newcode364 components/guest_view/browser/guest_view_manager.cc:364: embedder_render_process_host_observers_.push_back( On 2015/07/10 15:24:01, Fady Samuel wrote: ...
5 years, 5 months ago (2015-07-10 15:34:47 UTC) #6
Fady Samuel
https://codereview.chromium.org/1232603002/diff/40001/components/guest_view/browser/guest_view_manager.cc File components/guest_view/browser/guest_view_manager.cc (right): https://codereview.chromium.org/1232603002/diff/40001/components/guest_view/browser/guest_view_manager.cc#newcode367 components/guest_view/browser/guest_view_manager.cc:367: new EmbedderRenderProcessHostObserver(this, embedder_process_id); Hmm, what if you add a ...
5 years, 5 months ago (2015-07-10 15:37:00 UTC) #7
paulmeyer
ptal. https://codereview.chromium.org/1232603002/diff/40001/components/guest_view/browser/guest_view_manager.cc File components/guest_view/browser/guest_view_manager.cc (right): https://codereview.chromium.org/1232603002/diff/40001/components/guest_view/browser/guest_view_manager.cc#newcode367 components/guest_view/browser/guest_view_manager.cc:367: new EmbedderRenderProcessHostObserver(this, embedder_process_id); On 2015/07/10 15:36:59, Fady Samuel ...
5 years, 5 months ago (2015-07-10 20:05:25 UTC) #8
Fady Samuel
https://codereview.chromium.org/1232603002/diff/60001/components/guest_view/browser/guest_view_manager.cc File components/guest_view/browser/guest_view_manager.cc (right): https://codereview.chromium.org/1232603002/diff/60001/components/guest_view/browser/guest_view_manager.cc#newcode298 components/guest_view/browser/guest_view_manager.cc:298: context_, Why does the cleanup function need the browser ...
5 years, 5 months ago (2015-07-14 17:56:59 UTC) #9
paulmeyer
https://codereview.chromium.org/1232603002/diff/60001/components/guest_view/browser/guest_view_manager.cc File components/guest_view/browser/guest_view_manager.cc (right): https://codereview.chromium.org/1232603002/diff/60001/components/guest_view/browser/guest_view_manager.cc#newcode298 components/guest_view/browser/guest_view_manager.cc:298: context_, On 2015/07/14 17:56:59, Fady Samuel wrote: > Why ...
5 years, 5 months ago (2015-07-14 18:04:07 UTC) #10
Fady Samuel
lgtm
5 years, 5 months ago (2015-07-16 13:37:06 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1232603002/60001
5 years, 5 months ago (2015-07-16 13:39:28 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/86753) (exceeded global retry quota)
5 years, 5 months ago (2015-07-16 14:05:03 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1232603002/80001
5 years, 5 months ago (2015-07-16 14:14:34 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/79235) (exceeded global retry quota)
5 years, 5 months ago (2015-07-16 14:52:42 UTC) #20
paulmeyer
+kalman@ for rules_registry_service.* and browser_context_keyed_api_factory.h These changes were made to avoid creating a new RulesRegistryService ...
5 years, 5 months ago (2015-07-20 17:09:34 UTC) #24
not at google - send to devlin
https://codereview.chromium.org/1232603002/diff/140001/extensions/browser/browser_context_keyed_api_factory.h File extensions/browser/browser_context_keyed_api_factory.h (right): https://codereview.chromium.org/1232603002/diff/140001/extensions/browser/browser_context_keyed_api_factory.h#newcode79 extensions/browser/browser_context_keyed_api_factory.h:79: static T* Get(content::BrowserContext* context, bool create) { I'd rather ...
5 years, 5 months ago (2015-07-20 21:17:57 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1232603002/180001
5 years, 5 months ago (2015-07-21 14:43:57 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:180001)
5 years, 5 months ago (2015-07-21 15:41:55 UTC) #30
commit-bot: I haz the power
5 years, 5 months ago (2015-07-21 15:43:49 UTC) #31
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/bc4600abb6ba65953c6cefd139062e21f0b64977
Cr-Commit-Position: refs/heads/master@{#339658}

Powered by Google App Engine
This is Rietveld 408576698