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

Issue 6021: This fixes http://code.google.com/p/chromium/issues/detail?id=772,... (Closed)

Created:
12 years, 2 months ago by ananta
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

This fixes http://code.google.com/p/chromium/issues/detail?id=772, which was an issue with the browser UI thread entering a tight loop at times. The thread inputs of the browser UI thread and the plugin thread are attached due to the parent child relationship between the windows. As a result at times the MsgWaitForMultipleObjectsEx API returns the fact that there are messages in the queue (mouse messages). The subsequent peek fails to return any messages causing us to enter a loop for a while. This also happens when the plugin has capture and just before it releases capture, some mousemoves end up in the browser ui thread causing a tight loop. The fix is to check if there are mouse messages in the queue by invoking GetQueueStatus and attempting to peek them out with PM_NOREMOVE. If this fails we call WaitMessage to block until the next message. The other fix is to return true from ProcessNextWindowsMessage if PeekMessage returns false and there were sent messages in the queue, as this is as expected. This will ensure that we go back up and peek again instead of calling MsgWaitForMultipleObjectsEx again. Bug=772 R=darin Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=2740

Patch Set 1 #

Patch Set 2 : '' #

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

Messages

Total messages: 3 (0 generated)
ananta
12 years, 2 months ago (2008-09-30 22:33:45 UTC) #1
darin (slow to review)
LGTM Is it possible to add a test to message_loop_unittest.cc? http://codereview.chromium.org/6021/diff/1/2 File base/message_pump_win.cc (right): http://codereview.chromium.org/6021/diff/1/2#newcode216 ...
12 years, 2 months ago (2008-09-30 23:54:08 UTC) #2
ananta
12 years, 2 months ago (2008-10-01 00:06:39 UTC) #3
Hi Darin

I have updated the comments in the code. Based on our discussion I will look
into whether it is feasible to detach the thread inputs of the browser and the
plugin windows. If this works then it will get rid of the hassle with a hung
plugin taking down the browser hierarchy.

Thanks
Ananta

Powered by Google App Engine
This is Rietveld 408576698