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

Issue 10837170: Fix crash in WindowEventRouter::OnActiveWindowChanged when closing an incognito window. (Closed)

Created:
8 years, 4 months ago by dcheng
Modified:
8 years, 4 months ago
Reviewers:
Yoyo Zhou, jennb
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Fix crash in WindowEventRouter::OnActiveWindowChanged when closing an incognito window. When closing an incongito window, it is possible that the previously focused profile is already destroyed. Since profile_->IsSameProfile(previous_focused_profile) is always true in this case, we can just skip the check and dispatch the events against profile_. BUG=139237 TEST=open an incognito window and close it and hope it doesn't crash. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=150656

Patch Set 1 #

Total comments: 6

Patch Set 2 : Trim unnecessary parens #

Patch Set 3 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -10 lines) Patch
M chrome/browser/extensions/window_event_router.cc View 1 2 4 chunks +5 lines, -10 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
dcheng
8 years, 4 months ago (2012-08-08 19:09:44 UTC) #1
Yoyo Zhou
http://codereview.chromium.org/10837170/diff/1/chrome/browser/extensions/window_event_router.cc File chrome/browser/extensions/window_event_router.cc (right): http://codereview.chromium.org/10837170/diff/1/chrome/browser/extensions/window_event_router.cc#newcode154 chrome/browser/extensions/window_event_router.cc:154: if ((window_profile && !profile_->IsSameProfile(window_profile))) excessive parentheses http://codereview.chromium.org/10837170/diff/1/chrome/browser/extensions/window_event_router.cc#newcode157 chrome/browser/extensions/window_event_router.cc:157: ExtensionSystem::Get(profile_)->event_router()-> ...
8 years, 4 months ago (2012-08-08 19:36:58 UTC) #2
dcheng
http://codereview.chromium.org/10837170/diff/1/chrome/browser/extensions/window_event_router.cc File chrome/browser/extensions/window_event_router.cc (right): http://codereview.chromium.org/10837170/diff/1/chrome/browser/extensions/window_event_router.cc#newcode154 chrome/browser/extensions/window_event_router.cc:154: if ((window_profile && !profile_->IsSameProfile(window_profile))) On 2012/08/08 19:36:58, Yoyo Zhou ...
8 years, 4 months ago (2012-08-08 20:05:56 UTC) #3
dcheng
I've updated the CL a bit to trim out an if () check as well. ...
8 years, 4 months ago (2012-08-08 22:08:33 UTC) #4
Yoyo Zhou
LGTM, fingers crossed
8 years, 4 months ago (2012-08-08 22:11:38 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dcheng@chromium.org/10837170/1002
8 years, 4 months ago (2012-08-08 22:12:56 UTC) #6
commit-bot: I haz the power
Try job failure for 10837170-1002 (retry) on android for steps "compile, build" (clobber build). It's ...
8 years, 4 months ago (2012-08-08 22:40:09 UTC) #7
dcheng
8 years, 4 months ago (2012-08-09 00:39:11 UTC) #8
On 2012/08/08 22:40:09, I haz the power (commit-bot) wrote:
> Try job failure for 10837170-1002 (retry) on android for steps "compile,
build"
> (clobber build).
> It's a second try, previously, steps "compile, build" failed.
>
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=android&nu...

I tested locally and the failing tests on mac_rel/linux_rel seem to be flakes. I
will be landing this once the tree opens.

Powered by Google App Engine
This is Rietveld 408576698