Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Assertion failure in WebInspectorProxy::platformClose closing main wi…
…ndow when inspecting a popup

window, or when running regression tests.
https://bugs.webkit.org/show_bug.cgi?id=53798
<rdar://problem/8814364>

Reviewed by Adam Roben.

Only assert about the state of m_inspectorWindow and m_inspectorView if the inspector is visible.
Also, only call ::DestroyWindow if the HWND is non-null, just to be safe.

* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformClose):



Canonical link: https://commits.webkit.org/67726@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
b-weinstein committed Feb 4, 2011
1 parent 2db4769 commit 472179f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
15 changes: 15 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,18 @@
2011-02-04 Brian Weinstein <bweinstein@apple.com>

Reviewed by Adam Roben.

Assertion failure in WebInspectorProxy::platformClose closing main window when inspecting a popup
window, or when running regression tests.
https://bugs.webkit.org/show_bug.cgi?id=53798
<rdar://problem/8814364>

Only assert about the state of m_inspectorWindow and m_inspectorView if the inspector is visible.
Also, only call ::DestroyWindow if the HWND is non-null, just to be safe.

* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::platformClose):

2011-02-04 Anders Carlsson <andersca@apple.com>

Reviewed by Dan Bernstein.
Expand Down
9 changes: 6 additions & 3 deletions Source/WebKit2/UIProcess/win/WebInspectorProxyWin.cpp
Expand Up @@ -172,10 +172,13 @@ void WebInspectorProxy::platformOpen()

void WebInspectorProxy::platformClose()
{
ASSERT(m_inspectorWindow);
ASSERT(m_inspectorView);
ASSERT(!m_isVisible || m_inspectorWindow);
ASSERT(!m_isVisible || m_inspectorView);

::DestroyWindow(m_inspectorWindow);
if (m_inspectorWindow) {
ASSERT(::IsWindow(m_inspectorWindow));
::DestroyWindow(m_inspectorWindow);
}

m_inspectorWindow = 0;
m_inspectorView = 0;
Expand Down

0 comments on commit 472179f

Please sign in to comment.