[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 07:22:04 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f3d06c229f26d5da1a9d1ca8c20547ffe7c8a19b
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 27 19:37:18 2003 +0000
WebKit:
Fixed 3151241. Cleanly handle nil return from resource:willSendRequest:fromDataSource:.
Reviewed by trey.
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate handle:willSendRequest:]):
(-[WebBaseResourceHandleDelegate handleDidFinishLoading:]):
(-[WebBaseResourceHandleDelegate handle:didFailLoadingWithError:]):
(-[WebBaseResourceHandleDelegate cancelWithError:]):
* WebView.subproj/WebControllerPrivate.m:
(-[WebController _mainReceivedError:fromDataSource:complete:]):
Tests:
Removed unneeded local variable that shadowed ivar.
Reviewed by me.
* SimpleViewer/DocumentController.m:
(-[DocumentController loadURL:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index a6ab0a8..fdb9e3c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2003-01-27 Richard Williamson <rjw at apple.com>
+
+ Fixed 3151241. Cleanly handle nil return from resource:willSendRequest:fromDataSource:.
+
+ Reviewed by trey.
+
+ * WebView.subproj/WebBaseResourceHandleDelegate.m:
+ (-[WebBaseResourceHandleDelegate handle:willSendRequest:]):
+ (-[WebBaseResourceHandleDelegate handleDidFinishLoading:]):
+ (-[WebBaseResourceHandleDelegate handle:didFailLoadingWithError:]):
+ (-[WebBaseResourceHandleDelegate cancelWithError:]):
+ * WebView.subproj/WebControllerPrivate.m:
+ (-[WebController _mainReceivedError:fromDataSource:complete:]):
+
2003-01-27 John Sullivan <sullivan at apple.com>
- fixed 3156744 -- REGRESSION: Renaming bookmarks dragged
diff --git a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
index f9f364e..bff88f0 100644
--- a/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
+++ b/WebKit/WebView.subproj/WebBaseResourceHandleDelegate.m
@@ -147,15 +147,24 @@
// Store a copy of the request.
[request autorelease];
- request = [newRequest copy];
if (currentURL) {
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
- }
- [currentURL release];
- currentURL = [[request URL] retain];
- [[WebStandardPanels sharedStandardPanels] _didStartLoadingURL:currentURL inController:controller];
-
+ [currentURL release];
+ currentURL = nil;
+ }
+
+ // Client may return a nil request, indicating that the request should be aborted.
+ if (newRequest){
+ request = [newRequest copy];
+ currentURL = [[request URL] retain];
+ if (currentURL)
+ [[WebStandardPanels sharedStandardPanels] _didStartLoadingURL:currentURL inController:controller];
+ }
+ else {
+ request = nil;
+ }
+
return request;
}
@@ -195,6 +204,7 @@
else
[resourceLoadDelegate resource:identifier didFinishLoadingFromDataSource:dataSource];
+ ASSERT(currentURL);
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
[self _releaseResources];
@@ -210,7 +220,9 @@
else
[resourceLoadDelegate resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
- [[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
+ // currentURL may be nil if the request was aborted
+ if (currentURL)
+ [[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
[self _releaseResources];
}
@@ -221,7 +233,9 @@
[handle cancel];
- [[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
+ // currentURL may be nil if the request was aborted
+ if (currentURL)
+ [[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
if (error) {
if ([self isDownload]) {
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 169e700..a0bb6cd 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -155,7 +155,6 @@
- (void)_mainReceivedError:(WebError *)error fromDataSource:(WebDataSource *)dataSource complete:(BOOL)isComplete
{
- ASSERT(error);
ASSERT(dataSource);
#ifndef NDEBUG
if (![dataSource isDownloading])
diff --git a/WebKit/WebView.subproj/WebLoader.m b/WebKit/WebView.subproj/WebLoader.m
index f9f364e..bff88f0 100644
--- a/WebKit/WebView.subproj/WebLoader.m
+++ b/WebKit/WebView.subproj/WebLoader.m
@@ -147,15 +147,24 @@
// Store a copy of the request.
[request autorelease];
- request = [newRequest copy];
if (currentURL) {
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
- }
- [currentURL release];
- currentURL = [[request URL] retain];
- [[WebStandardPanels sharedStandardPanels] _didStartLoadingURL:currentURL inController:controller];
-
+ [currentURL release];
+ currentURL = nil;
+ }
+
+ // Client may return a nil request, indicating that the request should be aborted.
+ if (newRequest){
+ request = [newRequest copy];
+ currentURL = [[request URL] retain];
+ if (currentURL)
+ [[WebStandardPanels sharedStandardPanels] _didStartLoadingURL:currentURL inController:controller];
+ }
+ else {
+ request = nil;
+ }
+
return request;
}
@@ -195,6 +204,7 @@
else
[resourceLoadDelegate resource:identifier didFinishLoadingFromDataSource:dataSource];
+ ASSERT(currentURL);
[[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
[self _releaseResources];
@@ -210,7 +220,9 @@
else
[resourceLoadDelegate resource:identifier didFailLoadingWithError:result fromDataSource:dataSource];
- [[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
+ // currentURL may be nil if the request was aborted
+ if (currentURL)
+ [[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
[self _releaseResources];
}
@@ -221,7 +233,9 @@
[handle cancel];
- [[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
+ // currentURL may be nil if the request was aborted
+ if (currentURL)
+ [[WebStandardPanels sharedStandardPanels] _didStopLoadingURL:currentURL inController:controller];
if (error) {
if ([self isDownload]) {
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 169e700..a0bb6cd 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -155,7 +155,6 @@
- (void)_mainReceivedError:(WebError *)error fromDataSource:(WebDataSource *)dataSource complete:(BOOL)isComplete
{
- ASSERT(error);
ASSERT(dataSource);
#ifndef NDEBUG
if (![dataSource isDownloading])
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list