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

Issue 1037103004: Fix a crash seen in Desktop Chrome Windows while displaying a bubble (Closed)

Created:
5 years, 9 months ago by ananta
Modified:
5 years, 9 months ago
Reviewers:
msw, Shu Chen, Jun Mukai, sky, yukawa
CC:
chromium-reviews, msw+watch_chromium.org, alicet1, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a crash seen in Desktop Chrome Windows while displaying a bubble It is not clear as to how this crash occurs. From the callstack, the crash occurs in the context of a bubble getting created and before it is initialized. In the context of the bubble creation, DesktopNativeWidgetAura instantiates the IME COM objects which instantiate a local COM server. This causes the main UI loop to be reentered and the bubble is resized in this context. The WidgetObserver OnWidgetBoundsChanged method in the BubbleDelegateView gets invoked which crashes while dereferencing the top level widget as it has not been initialized yet. It is unclear as to how the WidgetObserver is set up here. From the code the BubbleDelegateView observer is setup after the bubble is initialized, i.e in the BubbleDelegateView::CreateBubble function after the bubble is created. Fix is to delay the initialization of the IME on Windows until we receive the first IME message or an input language change notification BUG=454375 TEST=None at the moment, as it is unclear as to how this crash can happen. Committed: https://crrev.com/00a39f50c2c623987ab68a4ae253147101d21876 Cr-Commit-Position: refs/heads/master@{#322669}

Patch Set 1 #

Patch Set 2 : Delay creation of the IME #

Total comments: 4

Patch Set 3 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -4 lines) Patch
M ui/base/ime/input_method_win.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M ui/base/ime/input_method_win.cc View 1 2 4 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (6 generated)
ananta
5 years, 9 months ago (2015-03-27 02:11:57 UTC) #2
sky
On 2015/03/27 02:11:57, ananta wrote: I'm worried that this isn't enough and you're working around ...
5 years, 9 months ago (2015-03-27 15:29:16 UTC) #3
msw
It'd be helpful to find the regression CL (I highlighted some suspicious CLs on the ...
5 years, 9 months ago (2015-03-27 17:52:04 UTC) #5
ananta
On 2015/03/27 15:29:16, sky wrote: > On 2015/03/27 02:11:57, ananta wrote: > > I'm worried ...
5 years, 9 months ago (2015-03-27 18:53:55 UTC) #7
ananta
+mukai for IME owners review.
5 years, 9 months ago (2015-03-27 18:54:40 UTC) #8
msw
https://codereview.chromium.org/1037103004/diff/20001/ui/base/ime/input_method_win.cc File ui/base/ime/input_method_win.cc (right): https://codereview.chromium.org/1037103004/diff/20001/ui/base/ime/input_method_win.cc#newcode69 ui/base/ime/input_method_win.cc:69: default_input_language_initialized_ = true; Nix this, it's set in OnInputLocaleChanged(). ...
5 years, 9 months ago (2015-03-27 19:05:23 UTC) #9
ananta
https://codereview.chromium.org/1037103004/diff/20001/ui/base/ime/input_method_win.cc File ui/base/ime/input_method_win.cc (right): https://codereview.chromium.org/1037103004/diff/20001/ui/base/ime/input_method_win.cc#newcode69 ui/base/ime/input_method_win.cc:69: default_input_language_initialized_ = true; On 2015/03/27 19:05:23, msw wrote: > ...
5 years, 9 months ago (2015-03-27 19:08:39 UTC) #10
Jun Mukai
it looks good, but yukawa@ should review input_method_win.
5 years, 9 months ago (2015-03-27 19:49:56 UTC) #12
yukawa
Can you update the CL description? It looks a bit obsolete. (We no longer touch ...
5 years, 9 months ago (2015-03-27 20:29:55 UTC) #13
yukawa
Regarding the initialization of a COM server, probably that's here, right? https://chromium.googlesource.com/chromium/src/+/5e16d46c92747ae76914b9a5db114a19cdb00bde/ui/base/ime/win/imm32_manager.cc#143 Just for the ...
5 years, 9 months ago (2015-03-27 20:48:56 UTC) #15
ananta
On 2015/03/27 20:48:56, yukawa wrote: > Regarding the initialization of a COM server, probably that's ...
5 years, 9 months ago (2015-03-27 20:52:03 UTC) #16
ananta
On 2015/03/27 20:48:56, yukawa wrote: > Regarding the initialization of a COM server, probably that's ...
5 years, 9 months ago (2015-03-27 20:52:36 UTC) #17
yukawa
lgtm LGTM. Thanks. I'll file a follow-up issue as a reminder to (try to) revert ...
5 years, 9 months ago (2015-03-27 21:00:14 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1037103004/40001
5 years, 9 months ago (2015-03-27 22:10:45 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 9 months ago (2015-03-27 23:10:47 UTC) #21
commit-bot: I haz the power
5 years, 9 months ago (2015-03-27 23:11:36 UTC) #22
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/00a39f50c2c623987ab68a4ae253147101d21876
Cr-Commit-Position: refs/heads/master@{#322669}

Powered by Google App Engine
This is Rietveld 408576698