Commit bc879c42 authored by arv@chromium.org's avatar arv@chromium.org

Unreviewed, rolling out r140703.

http://trac.webkit.org/changeset/140703
https://bugs.webkit.org/show_bug.cgi?id=107556

r140561 was not the reason for the Android breakage

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::~TestShell):
(TestShell::closeWindow):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::WebViewHost):
(WebViewHost::~WebViewHost):
(WebViewHost::shutdown):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d0e91083
2013-01-24 Erik Arvidsson <arv@chromium.org>
Unreviewed, rolling out r140703.
http://trac.webkit.org/changeset/140703
https://bugs.webkit.org/show_bug.cgi?id=107556
r140561 was not the reason for the Android breakage
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::~TestShell):
(TestShell::closeWindow):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::WebViewHost):
(WebViewHost::~WebViewHost):
(WebViewHost::shutdown):
* DumpRenderTree/chromium/WebViewHost.h:
(WebViewHost):
2013-01-24 Dean Jackson <dino@apple.com>
Allow some plugin snapshot UI content to come from Injected Bundle
......
......@@ -202,6 +202,8 @@ TestShell::~TestShell()
m_testRunner->setDelegate(0);
m_testRunner->setWebView(0);
m_drtDevToolsAgent->setWebView(0);
if (m_webViewHost)
m_webViewHost->shutdown();
}
void TestShell::createDRTDevToolsClient(DRTDevToolsAgent* agent)
......@@ -794,6 +796,7 @@ void TestShell::closeWindow(WebViewHost* window)
if (window->webWidget() == m_focusedWidget)
focusedWidget = 0;
window->shutdown();
delete window;
// We set the focused widget after deleting the web view host because it
// can change the focus.
......
......@@ -1081,12 +1081,22 @@ WebViewHost::WebViewHost(TestShell* shell)
: m_shell(shell)
, m_proxy(0)
, m_webWidget(0)
, m_shutdownWasInvoked(false)
{
reset();
}
WebViewHost::~WebViewHost()
{
ASSERT(m_shutdownWasInvoked);
if (m_inModalLoop)
webkit_support::QuitMessageLoop();
}
void WebViewHost::shutdown()
{
ASSERT(!m_shutdownWasInvoked);
// DevTools frontend page is supposed to be navigated only once and
// loading another URL in that Page is an error.
if (m_shell->devToolsWebView() != this) {
......@@ -1101,8 +1111,8 @@ WebViewHost::~WebViewHost()
m_layerTreeView.clear();
webWidget()->close();
if (m_inModalLoop)
webkit_support::QuitMessageLoop();
m_webWidget = 0;
m_shutdownWasInvoked = true;
}
void WebViewHost::setWebWidget(WebKit::WebWidget* widget)
......
......@@ -79,6 +79,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
public:
WebViewHost(TestShell*);
virtual ~WebViewHost();
void shutdown();
void setWebWidget(WebKit::WebWidget*);
WebKit::WebView* webView() const;
WebKit::WebWidget* webWidget() const;
......@@ -371,6 +372,9 @@ private:
bool m_hasWindow;
bool m_inModalLoop;
bool m_shutdownWasInvoked;
WebKit::WebRect m_windowRect;
// true if we want to enable smart insert/delete.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment