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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:15:19 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d6b5ba53b89a970685497aba677c2f48b9fd81b3
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue May 28 22:10:34 2002 +0000

        Fixed reporting of malformed resources URLs.  This fixed
        exceptions that were being thrown because nil handles were
        being added to datasource handle array.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1227 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 8163ee2..a673b1a 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,13 @@
+2002-05-28  Richard Williamson  <rjw at apple.com>
+
+    Fixed reporting of malformed resources URLs.  This fixed
+    exceptions that were being thrown because nil handles were
+    being added to datasource handle array.
+
+	* kwq/KWQKjobclasses.mm:
+	* kwq/KWQKloader.mm:
+	(Loader::servePendingRequests):
+
 2002-05-28  Chris Blumenberg  <cblu at apple.com>
 
 	Added framework-header-stamp
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 8163ee2..a673b1a 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,13 @@
+2002-05-28  Richard Williamson  <rjw at apple.com>
+
+    Fixed reporting of malformed resources URLs.  This fixed
+    exceptions that were being thrown because nil handles were
+    being added to datasource handle array.
+
+	* kwq/KWQKjobclasses.mm:
+	* kwq/KWQKloader.mm:
+	(Loader::servePendingRequests):
+
 2002-05-28  Chris Blumenberg  <cblu at apple.com>
 
 	Added framework-header-stamp
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8163ee2..a673b1a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2002-05-28  Richard Williamson  <rjw at apple.com>
+
+    Fixed reporting of malformed resources URLs.  This fixed
+    exceptions that were being thrown because nil handles were
+    being added to datasource handle array.
+
+	* kwq/KWQKjobclasses.mm:
+	* kwq/KWQKloader.mm:
+	(Loader::servePendingRequests):
+
 2002-05-28  Chris Blumenberg  <cblu at apple.com>
 
 	Added framework-header-stamp
diff --git a/WebCore/kwq/KWQKJobClasses.mm b/WebCore/kwq/KWQKJobClasses.mm
index 4b45d42..b5c2760 100644
--- a/WebCore/kwq/KWQKJobClasses.mm
+++ b/WebCore/kwq/KWQKJobClasses.mm
@@ -177,7 +177,7 @@ void TransferJob::begin(id <IFURLHandleClient> client, void *userData)
     
     d->client = client;
     attributes = [NSDictionary dictionaryWithObject:[NSValue valueWithPointer:userData] forKey:IFURLHandleUserData];
-    d->handle = [[IFURLHandle alloc] initWithURL:d->url attributes:attributes flags:0];
+    d->handle = [[IFURLHandle alloc] initWithURL:d->url attributes:attributes flags:0];    
     [d->handle addClient:client];
     [d->handle loadInBackground];
 }
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index 5c2f039..0fb34b1 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -1242,51 +1242,61 @@ void Loader::load(DocLoader* dl, CachedObject *object, bool incremental = true)
 
 void Loader::servePendingRequests()
 {
-  if ( m_requestsPending.count() == 0 )
+    if ( m_requestsPending.count() == 0 )
       return;
-
-  // get the first pending request
-  Request *req = m_requestsPending.take(0);
-
-#ifdef CACHE_DEBUG
-  kdDebug( 6060 ) << "starting Loader url=" << req->object->url().string() << endl;
-#endif
-
-  KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
-
+    
+    // get the first pending request
+    Request *req = m_requestsPending.take(0);
+    
+    #ifdef CACHE_DEBUG
+    kdDebug( 6060 ) << "starting Loader url=" << req->object->url().string() << endl;
+    #endif
+    
+    KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
+    
 #ifdef APPLE_CHANGES
-  KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n", 
-		  req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
-  //job->begin(d->m_recv, job);
-  job->begin((URLLoadClient *)req->client, job);
-  [((URLLoadClient *)req->client)->m_dataSource _addURLHandle: job->handle()];
+    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n", 
+          req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
+    //job->begin(d->m_recv, job);
+    job->begin((URLLoadClient *)req->client, job);
+    if (job->handle() == nil){
+        // Must be a malformed URL.
+        NSString *urlString = QSTRING_TO_NSSTRING(req->object->url().string());
+        IFError *error = [IFError errorWithCode:IFURLHandleResultBadURLError inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];
+
+        id <IFLoadHandler> controller = [((URLLoadClient *)req->client)->m_dataSource controller];
+        [(IFBaseWebController *)controller _receivedError: error forResource: urlString partialProgress: nil fromDataSource: ((URLLoadClient *)req->client)->m_dataSource];
+    }
+    else {
+        [((URLLoadClient *)req->client)->m_dataSource _addURLHandle: job->handle()];
 #else
-  if (!req->object->accept().isEmpty())
+    if (!req->object->accept().isEmpty())
       job->addMetaData("accept", req->object->accept());
-  if ( req->m_docLoader )  {
+    if ( req->m_docLoader )  {
       KURL r = req->m_docLoader->doc()->URL();
       if ( r.protocol().startsWith( "http" ) && r.path().isEmpty() )
           r.setPath( "/" );
- 
+    
       job->addMetaData("referrer", r.url());
-
+    
       if (req->m_docLoader->part()->restored())
       {
-//          kdDebug() << "USING NON-VALIDATING CACHE!"<< endl;
+    //          kdDebug() << "USING NON-VALIDATING CACHE!"<< endl;
           job->addMetaData("cache","Cache");
       }
-
-  }
-
-  connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished( KIO::Job * ) ) );
-  connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
+    
+    }
+    
+    connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished( KIO::Job * ) ) );
+    connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
            SLOT( slotData( KIO::Job*, const QByteArray &)));
-
-  if ( req->object->schedule() )
+    
+    if ( req->object->schedule() )
       KIO::Scheduler::scheduleJob( job );
 #endif
-
-  m_requestsLoading.insert(job, req);
+    
+        m_requestsLoading.insert(job, req);
+    }
 }
 
 void Loader::slotFinished( KIO::Job* job )
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 5c2f039..0fb34b1 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -1242,51 +1242,61 @@ void Loader::load(DocLoader* dl, CachedObject *object, bool incremental = true)
 
 void Loader::servePendingRequests()
 {
-  if ( m_requestsPending.count() == 0 )
+    if ( m_requestsPending.count() == 0 )
       return;
-
-  // get the first pending request
-  Request *req = m_requestsPending.take(0);
-
-#ifdef CACHE_DEBUG
-  kdDebug( 6060 ) << "starting Loader url=" << req->object->url().string() << endl;
-#endif
-
-  KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
-
+    
+    // get the first pending request
+    Request *req = m_requestsPending.take(0);
+    
+    #ifdef CACHE_DEBUG
+    kdDebug( 6060 ) << "starting Loader url=" << req->object->url().string() << endl;
+    #endif
+    
+    KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
+    
 #ifdef APPLE_CHANGES
-  KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n", 
-		  req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
-  //job->begin(d->m_recv, job);
-  job->begin((URLLoadClient *)req->client, job);
-  [((URLLoadClient *)req->client)->m_dataSource _addURLHandle: job->handle()];
+    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n", 
+          req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
+    //job->begin(d->m_recv, job);
+    job->begin((URLLoadClient *)req->client, job);
+    if (job->handle() == nil){
+        // Must be a malformed URL.
+        NSString *urlString = QSTRING_TO_NSSTRING(req->object->url().string());
+        IFError *error = [IFError errorWithCode:IFURLHandleResultBadURLError inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];
+
+        id <IFLoadHandler> controller = [((URLLoadClient *)req->client)->m_dataSource controller];
+        [(IFBaseWebController *)controller _receivedError: error forResource: urlString partialProgress: nil fromDataSource: ((URLLoadClient *)req->client)->m_dataSource];
+    }
+    else {
+        [((URLLoadClient *)req->client)->m_dataSource _addURLHandle: job->handle()];
 #else
-  if (!req->object->accept().isEmpty())
+    if (!req->object->accept().isEmpty())
       job->addMetaData("accept", req->object->accept());
-  if ( req->m_docLoader )  {
+    if ( req->m_docLoader )  {
       KURL r = req->m_docLoader->doc()->URL();
       if ( r.protocol().startsWith( "http" ) && r.path().isEmpty() )
           r.setPath( "/" );
- 
+    
       job->addMetaData("referrer", r.url());
-
+    
       if (req->m_docLoader->part()->restored())
       {
-//          kdDebug() << "USING NON-VALIDATING CACHE!"<< endl;
+    //          kdDebug() << "USING NON-VALIDATING CACHE!"<< endl;
           job->addMetaData("cache","Cache");
       }
-
-  }
-
-  connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished( KIO::Job * ) ) );
-  connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
+    
+    }
+    
+    connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished( KIO::Job * ) ) );
+    connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
            SLOT( slotData( KIO::Job*, const QByteArray &)));
-
-  if ( req->object->schedule() )
+    
+    if ( req->object->schedule() )
       KIO::Scheduler::scheduleJob( job );
 #endif
-
-  m_requestsLoading.insert(job, req);
+    
+        m_requestsLoading.insert(job, req);
+    }
 }
 
 void Loader::slotFinished( KIO::Job* job )
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 5c2f039..0fb34b1 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -1242,51 +1242,61 @@ void Loader::load(DocLoader* dl, CachedObject *object, bool incremental = true)
 
 void Loader::servePendingRequests()
 {
-  if ( m_requestsPending.count() == 0 )
+    if ( m_requestsPending.count() == 0 )
       return;
-
-  // get the first pending request
-  Request *req = m_requestsPending.take(0);
-
-#ifdef CACHE_DEBUG
-  kdDebug( 6060 ) << "starting Loader url=" << req->object->url().string() << endl;
-#endif
-
-  KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
-
+    
+    // get the first pending request
+    Request *req = m_requestsPending.take(0);
+    
+    #ifdef CACHE_DEBUG
+    kdDebug( 6060 ) << "starting Loader url=" << req->object->url().string() << endl;
+    #endif
+    
+    KIO::TransferJob* job = KIO::get( req->object->url().string(), req->object->reload(), false /*no GUI*/);
+    
 #ifdef APPLE_CHANGES
-  KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n", 
-		  req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
-  //job->begin(d->m_recv, job);
-  job->begin((URLLoadClient *)req->client, job);
-  [((URLLoadClient *)req->client)->m_dataSource _addURLHandle: job->handle()];
+    KWQDEBUGLEVEL (KWQ_LOG_LOADING, "Serving request for base %s, url %s\n", 
+          req->m_docLoader->part()->baseURL().url().latin1(), req->object->url().string().latin1());
+    //job->begin(d->m_recv, job);
+    job->begin((URLLoadClient *)req->client, job);
+    if (job->handle() == nil){
+        // Must be a malformed URL.
+        NSString *urlString = QSTRING_TO_NSSTRING(req->object->url().string());
+        IFError *error = [IFError errorWithCode:IFURLHandleResultBadURLError inDomain:IFErrorCodeDomainWebFoundation isTerminal:YES];
+
+        id <IFLoadHandler> controller = [((URLLoadClient *)req->client)->m_dataSource controller];
+        [(IFBaseWebController *)controller _receivedError: error forResource: urlString partialProgress: nil fromDataSource: ((URLLoadClient *)req->client)->m_dataSource];
+    }
+    else {
+        [((URLLoadClient *)req->client)->m_dataSource _addURLHandle: job->handle()];
 #else
-  if (!req->object->accept().isEmpty())
+    if (!req->object->accept().isEmpty())
       job->addMetaData("accept", req->object->accept());
-  if ( req->m_docLoader )  {
+    if ( req->m_docLoader )  {
       KURL r = req->m_docLoader->doc()->URL();
       if ( r.protocol().startsWith( "http" ) && r.path().isEmpty() )
           r.setPath( "/" );
- 
+    
       job->addMetaData("referrer", r.url());
-
+    
       if (req->m_docLoader->part()->restored())
       {
-//          kdDebug() << "USING NON-VALIDATING CACHE!"<< endl;
+    //          kdDebug() << "USING NON-VALIDATING CACHE!"<< endl;
           job->addMetaData("cache","Cache");
       }
-
-  }
-
-  connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished( KIO::Job * ) ) );
-  connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
+    
+    }
+    
+    connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotFinished( KIO::Job * ) ) );
+    connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
            SLOT( slotData( KIO::Job*, const QByteArray &)));
-
-  if ( req->object->schedule() )
+    
+    if ( req->object->schedule() )
       KIO::Scheduler::scheduleJob( job );
 #endif
-
-  m_requestsLoading.insert(job, req);
+    
+        m_requestsLoading.insert(job, req);
+    }
 }
 
 void Loader::slotFinished( KIO::Job* job )

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list