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

Issue 24177003: Fixed crash when chrome.runtime.reload() is called with app windows open (Closed)

Created:
7 years, 3 months ago by tmdiep
Modified:
7 years, 2 months ago
CC:
chromium-reviews, tfarina, scheib+watch_chromium.org, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Fixed crash when chrome.runtime.reload() is called with app windows open app_window_contents.cc: Use host_->extension_id() as host_->extension() is freed when the app is reloaded. This fixes the crash. extension_process_manager.cc/h: Unregister render view hosts when the old extension instance is unloaded, since the background page data is erased. This avoids a DCHECK failure in DecrementLazyKeepaliveCount() due to an excess decrement when the old render view is destroyed. extension_service.h: Changed potentially misleading parameter name, as the function uses the extension ID, not the name. BUG=295266 TEST=See bug description for steps to reproduce crash Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=225360

Patch Set 1 #

Total comments: 5

Patch Set 2 : Remove RenderViewHosts from all_extension_views on unload instead of re-registering them when the n… #

Total comments: 4

Patch Set 3 : Fixed compilation failures #

Patch Set 4 : Fixed compilation failures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -8 lines) Patch
M apps/app_window_contents.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_process_manager.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_process_manager.cc View 1 2 3 4 chunks +31 lines, -6 lines 0 comments Download
M chrome/browser/extensions/extension_service.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20 (0 generated)
tmdiep
7 years, 3 months ago (2013-09-20 05:26:46 UTC) #1
benwells
https://codereview.chromium.org/24177003/diff/1/apps/app_window_contents.cc File apps/app_window_contents.cc (right): https://codereview.chromium.org/24177003/diff/1/apps/app_window_contents.cc#newcode99 apps/app_window_contents.cc:99: host_->extension_id(), huh, I was just looking at this today ...
7 years, 3 months ago (2013-09-20 07:35:30 UTC) #2
tmdiep
TL;DR - I might just sit on this patch, since there are general problems with ...
7 years, 3 months ago (2013-09-20 11:07:36 UTC) #3
benwells
https://codereview.chromium.org/24177003/diff/1/chrome/browser/extensions/extension_process_manager.cc File chrome/browser/extensions/extension_process_manager.cc (right): https://codereview.chromium.org/24177003/diff/1/chrome/browser/extensions/extension_process_manager.cc#newcode609 chrome/browser/extensions/extension_process_manager.cc:609: ReregisterRenderViewHosts(extension->id()); On 2013/09/20 11:07:36, tmdiep wrote: > On 2013/09/20 ...
7 years, 3 months ago (2013-09-20 11:22:47 UTC) #4
tmdiep
Left use of host_->extension_id(). Removed RenderViewHosts from all_extension_views_ when the old extension instance is unloaded ...
7 years, 3 months ago (2013-09-23 02:58:22 UTC) #5
benwells
https://codereview.chromium.org/24177003/diff/9001/chrome/browser/extensions/extension_process_manager.cc File chrome/browser/extensions/extension_process_manager.cc (right): https://codereview.chromium.org/24177003/diff/9001/chrome/browser/extensions/extension_process_manager.cc#newcode791 chrome/browser/extensions/extension_process_manager.cc:791: OnRenderViewHostUnregistered(profile, it->first); Would this have been sent out before ...
7 years, 3 months ago (2013-09-23 05:38:23 UTC) #6
tmdiep
https://codereview.chromium.org/24177003/diff/9001/chrome/browser/extensions/extension_process_manager.cc File chrome/browser/extensions/extension_process_manager.cc (right): https://codereview.chromium.org/24177003/diff/9001/chrome/browser/extensions/extension_process_manager.cc#newcode791 chrome/browser/extensions/extension_process_manager.cc:791: OnRenderViewHostUnregistered(profile, it->first); On 2013/09/23 05:38:23, benwells wrote: > Would ...
7 years, 3 months ago (2013-09-23 05:49:00 UTC) #7
benwells
lgtm but please wait for mpcomplete to have a look. Matt may prefer it with ...
7 years, 3 months ago (2013-09-23 06:33:55 UTC) #8
Matt Perry
For the ExtensionProcessManager change, maybe the bigger issue is that the views stay open when ...
7 years, 3 months ago (2013-09-23 21:42:31 UTC) #9
tmdiep
> For the ExtensionProcessManager change, maybe the bigger issue is that the views > stay ...
7 years, 3 months ago (2013-09-24 00:33:47 UTC) #10
benwells
On 2013/09/24 00:33:47, tmdiep wrote: > > For the ExtensionProcessManager change, maybe the bigger issue ...
7 years, 3 months ago (2013-09-24 01:48:52 UTC) #11
Matt Perry
OK, it sounds like we all agree there are bigger issues, but this change at ...
7 years, 3 months ago (2013-09-24 20:07:25 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tmdiep@chromium.org/24177003/9001
7 years, 3 months ago (2013-09-24 23:36:39 UTC) #13
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 3 months ago (2013-09-25 00:30:35 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tmdiep@chromium.org/24177003/48001
7 years, 2 months ago (2013-09-25 06:55:10 UTC) #15
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 2 months ago (2013-09-25 07:32:43 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tmdiep@chromium.org/24177003/59001
7 years, 2 months ago (2013-09-25 08:25:56 UTC) #17
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=80794
7 years, 2 months ago (2013-09-25 09:58:57 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tmdiep@chromium.org/24177003/59001
7 years, 2 months ago (2013-09-26 01:12:47 UTC) #19
commit-bot: I haz the power
7 years, 2 months ago (2013-09-26 06:33:12 UTC) #20
Message was sent while issue was closed.
Change committed as 225360

Powered by Google App Engine
This is Rietveld 408576698