[WinCairo] Crash when plugin window is destroyed.
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2015 17:55:28 +0000 (17:55 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2015 17:55:28 +0000 (17:55 +0000)
commit79970325f488020badef99b81e7d0936058130b8
tree20722bfb71a359c64d3daa46de5ee84e426fd3e8
parent367ce4cfb15fbb0fd04db260e9c5584d7cd42a22
[WinCairo] Crash when plugin window is destroyed.
https://bugs.webkit.org/show_bug.cgi?id=142905

Reviewed by Alex Christensen.

When a plugin window is destroyed with the Win32 api function DestroyWindow,
the system will send a synchronous WM_PARENTNOTIFY message to the WebView.
The WebView window procedure will, when processing the WM_PARENTNOTIFY message,
call UpdateWindow to paint synchronously. This will cause reentrancy problems,
since we're already called from WebCore code, and then reenter WebCore painting code.
We should avoid calling UpdateWindow when handling the WM_PARENTNOTIFY message.

* WebView.cpp:
(WebView::WebViewWndProc):
(WebView::updateWindowIfNeeded):
* WebView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit/win/WebView.h