[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:28:18 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 559e0dd517d37ccca6708040db7c7949ea69a388
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 2 21:15:12 2004 +0000

            Reviewed by Darin.
    
    	<rdar://problem/3549201>: repro crash in KHTMLPart::begin inside JavaScript code (gmpartsdirect.com)
    
    	Added some null checks. I am not sure why this page attaches a
    	document that has no view, but these changes make it work
    	perfectly.
    
    	* khtml/khtml_part.cpp:
            (KHTMLPart::begin): Add check for null view before use.  *
    	khtml/xml/dom_docimpl.cpp:
            (DocumentImpl::close): ditto
            (DocumentImpl::recalcStyle): Add check for null paint device.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6156 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 620de67..f0428f6 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2004-03-01  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	<rdar://problem/3549201>: repro crash in KHTMLPart::begin inside JavaScript code (gmpartsdirect.com)
+
+	Added some null checks. I am not sure why this page attaches a
+	document that has no view, but these changes make it work
+	perfectly.
+        
+	* khtml/khtml_part.cpp:
+        (KHTMLPart::begin): Add check for null view before use.  *
+	khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::close): ditto
+        (DocumentImpl::recalcStyle): Add check for null paint device.
+
 === Safari-130 ===
 
 2004-03-01  Ken Kocienda  <kocienda at apple.com>
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 9682822..cfae2af 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -1532,7 +1532,8 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
 
   d->m_doc->open();
   // clear widget
-  d->m_view->resizeContents( 0, 0 );
+  if (d->m_view)
+    d->m_view->resizeContents( 0, 0 );
   connect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
 
 #if !APPLE_CHANGES
diff --git a/WebCore/khtml/xml/dom_docimpl.cpp b/WebCore/khtml/xml/dom_docimpl.cpp
index 29995e7..be79dae 100644
--- a/WebCore/khtml/xml/dom_docimpl.cpp
+++ b/WebCore/khtml/xml/dom_docimpl.cpp
@@ -1015,7 +1015,7 @@ void DocumentImpl::recalcStyle( StyleChange change )
 	fontDef.italic = f.italic();
 	fontDef.weight = f.weight();
 #if APPLE_CHANGES
-        bool printing = m_paintDevice->devType() == QInternal::Printer;
+        bool printing = m_paintDevice && (m_paintDevice->devType() == QInternal::Printer);
         fontDef.usePrinterFont = printing;
 #endif
         if (m_view) {
@@ -1317,7 +1317,7 @@ void DocumentImpl::close()
         updateRendering();
         
         // Always do a layout after loading if needed.
-        if (renderer() && (!renderer()->firstChild() || renderer()->needsLayout()))
+        if (view() && renderer() && (!renderer()->firstChild() || renderer()->needsLayout()))
             view()->layout();
     }
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list