[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 07:20:04 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit bfdaa330cc53766bb73b3ff788a3a61405a8239b
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 17 01:43:56 2003 +0000

            Reviewed by Darin.
    
    	- fixed 3144771 - Crash in KJS::WindowFunc::tryCall leaving www.smogcheck.org
    
    	I fixed this by making sure we couldn't send the unload event twice, which was
    	happening before in certain circumstances.
    
            * khtml/khtml_part.cpp:
            (KHTMLPart::closeURL): When emitting load event, note that unload
    	event has not yet been sent.
            (KHTMLPart::checkEmitLoadEvent): Note when unload event has been
    	sent to avoid sending it twice.
            * khtml/khtmlpart_p.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3343 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 4bbb933..31595ec 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2003-01-16  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3144771 - Crash in KJS::WindowFunc::tryCall leaving www.smogcheck.org
+
+	I fixed this by making sure we couldn't send the unload event twice, which was
+	happening before in certain circumstances.
+	
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::closeURL): When emitting load event, note that unload
+	event has not yet been sent.
+        (KHTMLPart::checkEmitLoadEvent): Note when unload event has been
+	sent to avoid sending it twice.
+        * khtml/khtmlpart_p.h:
+
 2003-01-16  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4bbb933..31595ec 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-01-16  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3144771 - Crash in KJS::WindowFunc::tryCall leaving www.smogcheck.org
+
+	I fixed this by making sure we couldn't send the unload event twice, which was
+	happening before in certain circumstances.
+	
+        * khtml/khtml_part.cpp:
+        (KHTMLPart::closeURL): When emitting load event, note that unload
+	event has not yet been sent.
+        (KHTMLPart::checkEmitLoadEvent): Note when unload event has been
+	sent to avoid sending it twice.
+        * khtml/khtmlpart_p.h:
+
 2003-01-16  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index e33b5ff..fc791a4 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -501,11 +501,11 @@ bool KHTMLPart::closeURL()
   if ( d->m_doc && d->m_doc->isHTMLDocument() ) {
     HTMLDocumentImpl* hdoc = static_cast<HTMLDocumentImpl*>( d->m_doc );
 
-    if ( hdoc->body() && d->m_bLoadEventEmitted ) {
+    if ( hdoc->body() && d->m_bLoadEventEmitted && !d->m_bUnloadEventEmitted ) {
       hdoc->body()->dispatchWindowEvent( EventImpl::UNLOAD_EVENT, false, false );
       if ( d->m_doc )
         d->m_doc->updateRendering();
-      d->m_bLoadEventEmitted = false;
+      d->m_bUnloadEventEmitted = true;
     }
   }
 
@@ -1715,6 +1715,7 @@ void KHTMLPart::checkEmitLoadEvent()
   }
 
   d->m_bLoadEventEmitted = true;
+  d->m_bUnloadEventEmitted = false;
   if (d->m_doc)
     d->m_doc->close();
 }
diff --git a/WebCore/khtml/khtmlpart_p.h b/WebCore/khtml/khtmlpart_p.h
index 23b1868..c86b834 100644
--- a/WebCore/khtml/khtmlpart_p.h
+++ b/WebCore/khtml/khtmlpart_p.h
@@ -106,6 +106,7 @@ public:
     m_job = 0L;
     m_bComplete = true;
     m_bLoadEventEmitted = true;
+    m_bUnloadEventEmitted = true;
     m_cachePolicy = KIO::CC_Verify;
     m_manager = 0L;
     m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
@@ -251,6 +252,7 @@ public:
 
   bool m_bComplete:1;
   bool m_bLoadEventEmitted:1;
+  bool m_bUnloadEventEmitted:1;
   bool m_haveEncoding:1;
   bool m_bHTTPRefresh:1;
   bool m_onlyLocalReferences :1;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list