[chromium] DRT crashes at shutdown.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Mar 2012 19:46:09 +0000 (19:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Mar 2012 19:46:09 +0000 (19:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81504

Patch by Hao Zheng <zhenghao@chromium.org> on 2012-03-19
Reviewed by James Robinson.

WebCompositor must be destroyed after WebView is properly destroyed,
or some compositor objects like CCLayerTreeHost may not be destroyed.
However, it is really hard to make the destruction order correct
explicitly in ~TestShell. So move it out to DumpRenderTree.

* DumpRenderTree/chromium/DumpRenderTree.cpp:
(main):
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::~TestShell):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111220 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
Tools/DumpRenderTree/chromium/TestShell.cpp

index f13eae827c8bb2ca6acceb5084d5277b455298d4..347d4c5ccf32699081b86ad773f3a2ce9810bd06 100644 (file)
@@ -1,3 +1,20 @@
+2012-03-19  Hao Zheng  <zhenghao@chromium.org>
+
+        [chromium] DRT crashes at shutdown.
+        https://bugs.webkit.org/show_bug.cgi?id=81504
+
+        Reviewed by James Robinson.
+
+        WebCompositor must be destroyed after WebView is properly destroyed,
+        or some compositor objects like CCLayerTreeHost may not be destroyed.
+        However, it is really hard to make the destruction order correct
+        explicitly in ~TestShell. So move it out to DumpRenderTree.
+
+        * DumpRenderTree/chromium/DumpRenderTree.cpp:
+        (main):
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::~TestShell):
+
 2012-03-19  Dirk Pranke  <dpranke@chromium.org>
 
         add dpranke to webkitpy watchlist
index aac357636c2f97570eab3c127702f4891b0fb6cd..e4c4cb1eaed7cc557f19829ba5c48053e95b70b0 100644 (file)
@@ -31,6 +31,7 @@
 #include "config.h"
 
 #include "TestShell.h"
+#include "WebCompositor.h"
 #include "webkit/support/webkit_support.h"
 #include <v8/include/v8-testing.h>
 #include <v8/include/v8.h>
@@ -286,5 +287,8 @@ int main(int argc, char* argv[])
         shell.resetTestController();
     }
 
+    // Shutdown WebCompositor after TestShell is destructed properly.
+    WebKit::WebCompositor::shutdown();
+
     return EXIT_SUCCESS;
 }
index 09e8676512ac53e098e1dd995320e30f19abab87..eaca2bb153660f1638d2514eb942a34cc263ae3f 100644 (file)
@@ -176,8 +176,6 @@ TestShell::~TestShell()
 
     // Destroy the WebView before its WebViewHost.
     m_drtDevToolsAgent->setWebView(0);
-
-    WebCompositor::shutdown();
 }
 
 void TestShell::createDRTDevToolsClient(DRTDevToolsAgent* agent)