summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/win/main_win.cc
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 00:42:14 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 00:42:14 +0000
commit63ea79bddeb91ef4741ed12a300dea3618b6b9eb (patch)
tree02f6a5b98a1a94e2be4e97c34d413f041a425c9c /o3d/plugin/win/main_win.cc
parentd904bc88427330a9cf4a32f3129c2353736be5ab (diff)
downloadchromium_src-63ea79bddeb91ef4741ed12a300dea3618b6b9eb.zip
chromium_src-63ea79bddeb91ef4741ed12a300dea3618b6b9eb.tar.gz
chromium_src-63ea79bddeb91ef4741ed12a300dea3618b6b9eb.tar.bz2
Worked around infinite loop seen in Chrome on Windows when raising and
dismissing JavaScript alert over O3D view Review URL: http://codereview.chromium.org/155119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin/win/main_win.cc')
-rw-r--r--o3d/plugin/win/main_win.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index 90f8d44..57623d2 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -472,6 +472,10 @@ WindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
switch (Msg) {
case WM_PAINT: {
if (reentrance_count.get() > 1) {
+ // In Chrome, alert dialogs raised from JavaScript cause
+ // reentrant WM_PAINT messages to be dispatched and 100% CPU
+ // to be consumed unless we call this
+ ::ValidateRect(hWnd, NULL);
break; // Ignore this message; we're reentrant.
}
PAINTSTRUCT paint_struct;