Reviewed by Maciej
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2006 22:58:15 +0000 (22:58 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Sep 2006 22:58:15 +0000 (22:58 +0000)
        Fixed a bad iFrame crash, resolving some of the layout test badness

        * page/Frame.cpp:
        (WebCore::Frame::endIfNotLoading):
        - Added a RefPtr to protect the frame itself to prevent its destruction during this method

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

WebCore/ChangeLog
WebCore/page/Frame.cpp

index fa463d2319dcd8f0767556de18eddf06d0e8be19..7e60e3f2223d0b7ebd66ce9dfac4316c4a507cb9 100644 (file)
@@ -1,3 +1,13 @@
+2006-09-14  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Maciej
+
+        Fixed a bad iFrame crash, resolving some of the layout test badness
+
+        * page/Frame.cpp:
+        (WebCore::Frame::endIfNotLoading):
+        - Added a RefPtr to protect the frame itself to prevent its destruction during this method
+
 2006-09-14  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by harrison
index f9c47c82e456b7967f23bf696ce05bb16f54dfba..c99a12a8ad42925da002a10ba2cb94eaa56acc39 100644 (file)
@@ -728,6 +728,10 @@ void Frame::end()
 
 void Frame::endIfNotLoading()
 {
+    // The frame's last ref may be remove and it be deleted by checkCompleted(), 
+    // so we'll add a protective refcount
+    RefPtr<Frame> protector(this);
+    
     if (d->m_bLoadingMainResource)
         return;