Fix for 4028999, safari crashes when resetting if mallocsribble is on. Clip rects...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2005 01:45:11 +0000 (01:45 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2005 01:45:11 +0000 (01:45 +0000)
render objects.  Change the ordering.

        Reviewed by rjw

        * khtml/rendering/render_box.cpp:
        (RenderBox::detach):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::~RenderLayer):

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/rendering/render_box.cpp
WebCore/khtml/rendering/render_layer.cpp

index 9d22de93e42f862ec3cf36523a3965fb7b80be6c..41dda6c98d987c5bdafb651496fcb01a127d08f5 100644 (file)
@@ -1,3 +1,15 @@
+2005-02-28  David Hyatt  <hyatt@apple.com>
+
+       Fix for 4028999, safari crashes when resetting if mallocsribble is on.  Clip rects were being cleared using dead
+       render objects.  Change the ordering.
+       
+        Reviewed by rjw
+
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::detach):
+        * khtml/rendering/render_layer.cpp:
+        (RenderLayer::~RenderLayer):
+
 2005-02-28  Chris Blumenberg  <cblu@apple.com>
 
        Fixed: <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced
index 1a544dd5e06e6f77d97c74ac09b75596b80cc41d..0ea2dea71d60ddc847f99463bf51e96216742330 100644 (file)
@@ -135,6 +135,10 @@ void RenderBox::detach()
     RenderLayer* layer = m_layer;
     RenderArena* arena = renderArena();
     
+    // This must be done before we detach the RenderObject.
+    if (layer)
+        layer->clearClipRect();
+        
     if (m_inlineBoxWrapper) {
         if (!documentBeingDestroyed())
             m_inlineBoxWrapper->remove();
index 39ee3fb10397887f2cad2962ace1aad843f4c677..0f4177be19659e7d3d8ac8acb15ded6c85bcb604 100644 (file)
@@ -137,7 +137,7 @@ RenderLayer::~RenderLayer()
     delete m_marquee;
     
     // Make sure we have no lingering clip rects.
-    clearClipRect();
+    assert(!m_clipRects);
 }
 
 void RenderLayer::computeRepaintRects()