[BlackBerry] Crash running layout tests
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2013 14:05:19 +0000 (14:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2013 14:05:19 +0000 (14:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114503

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-04-12
Reviewed by Xan Lopez.

Hit an assertion in ~GuardedPointerBase when DRT is
deleted. DumpRenderTree class derives from
BlackBerry::Platform::LayoutTestClient that derives from
BlackBerry::Platform::GuardedPointerBase, so the DRT pointer
should no be released with delete but with
BlackBerry::Platform::deleteGuardedObject().

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):

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

Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog

index 59eb652..3d9e6e6 100644 (file)
@@ -490,7 +490,7 @@ WebPagePrivate::~WebPagePrivate()
     m_proximityDetector = 0;
 
 #if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
-    delete m_dumpRenderTree;
+    BlackBerry::Platform::deleteGuardedObject(static_cast<DumpRenderTree*>(m_dumpRenderTree));
     m_dumpRenderTree = 0;
 #endif
 
index 84da3e7..7f5bfeb 100644 (file)
@@ -1,5 +1,22 @@
 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        [BlackBerry] Crash running layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=114503
+
+        Reviewed by Xan Lopez.
+
+        Hit an assertion in ~GuardedPointerBase when DRT is
+        deleted. DumpRenderTree class derives from
+        BlackBerry::Platform::LayoutTestClient that derives from
+        BlackBerry::Platform::GuardedPointerBase, so the DRT pointer
+        should no be released with delete but with
+        BlackBerry::Platform::deleteGuardedObject().
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
+
+2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         [BlackBerry] Crash running layout tests when WebPage is destroyed
         https://bugs.webkit.org/show_bug.cgi?id=114497