summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;