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

Issue 6596094: touch: more fixes in the message pump. (Closed)

Created:
9 years, 9 months ago by sadrul
Modified:
9 years, 6 months ago
Reviewers:
Evan Martin
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

touch: more fixes in the message pump. Remove the signal handler when the message-pump terminates. This wouldn't normally be necessary, but it can happen that the message-pump is terminated, and then additional GTK+ operations happen (e.g. in unit_tests). Also check for non-null dispatcher before dispatching events. This can happen for the first-run dialog, and also in the unit_tests. BUG=none TEST=unit_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76643

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -5 lines) Patch
M base/message_pump_glib_x.cc View 3 chunks +18 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
sadrul
9 years, 9 months ago (2011-03-02 03:38:22 UTC) #1
sadrul
Opinions?
9 years, 9 months ago (2011-03-02 22:26:17 UTC) #2
Evan Martin
LGTM, though I admit I don't understand it too well
9 years, 9 months ago (2011-03-02 22:31:20 UTC) #3
sadrul
9 years, 9 months ago (2011-03-02 23:06:43 UTC) #4
On 2011/03/02 22:31:20, Evan Martin wrote:
> LGTM, though I admit I don't understand it too well

MessagePumpGlibX sets up a callback for the "realize" signal on creation. So
RemoveGtkWidgetRealizeNotifier is used to clean it up when the message-pump is
destroyed. This wouldn't normally be necessary for chrome, since not much is
done after the UI message-pump is terminated. But unit_tests creates multiple
message-pumps for the different tests, and the "realize" callbacks from
destroyed pumps get invoked, which causes it to crash.

The check for non-null dispatcher is because in some cases (e.g. for the
first-run dialog), MessagePumpForUI::Run is called, which runs the pump without
any dispatcher. So the check helps avoid a crash in such cases.

I hope that makes a bit more sense?

Powered by Google App Engine
This is Rietveld 408576698