[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 06:17:12 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0a869554dba49a35f8a0d7776a795124e92ea75f
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jun 6 00:45:26 2002 +0000

    	Fixed Radar 2936155 - crash in IFAuthenticationPanel
    
    	* Panels.subproj/IFAuthenticationPanel.m:
    	(-[IFAuthenticationPanel runAsSheetOnWindow:withRequest:]): Add
    	some assertions.
    
    	(-[IFAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
    	Avoid referencing instance variables after performing a selector
    	that might release this object. Also, add some assertions.
    
    	* Panels.subproj/IFPanelAuthenticationHandler.m:
    	(-[IFPanelAuthenticationHandler startAuthentication:]): Tweak
    	whitespace.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1283 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e10d296..5208dba 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-06-05  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixed Radar 2936155 - crash in IFAuthenticationPanel
+	
+	* Panels.subproj/IFAuthenticationPanel.m:
+	(-[IFAuthenticationPanel runAsSheetOnWindow:withRequest:]): Add
+	some assertions.
+	
+	(-[IFAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
+	Avoid referencing instance variables after performing a selector
+	that might release this object. Also, add some assertions.
+
+	* Panels.subproj/IFPanelAuthenticationHandler.m:
+	(-[IFPanelAuthenticationHandler startAuthentication:]): Tweak
+	whitespace.
+
 2002-06-05  Richard Williamson  <rjw at apple.com>
 
     Fixed snafu in recursion over frame tree.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index e10d296..5208dba 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-06-05  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixed Radar 2936155 - crash in IFAuthenticationPanel
+	
+	* Panels.subproj/IFAuthenticationPanel.m:
+	(-[IFAuthenticationPanel runAsSheetOnWindow:withRequest:]): Add
+	some assertions.
+	
+	(-[IFAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
+	Avoid referencing instance variables after performing a selector
+	that might release this object. Also, add some assertions.
+
+	* Panels.subproj/IFPanelAuthenticationHandler.m:
+	(-[IFPanelAuthenticationHandler startAuthentication:]): Tweak
+	whitespace.
+
 2002-06-05  Richard Williamson  <rjw at apple.com>
 
     Fixed snafu in recursion over frame tree.
diff --git a/WebKit/Panels.subproj/IFAuthenticationPanel.m b/WebKit/Panels.subproj/IFAuthenticationPanel.m
index 3a7cf57..ba1bb0f 100644
--- a/WebKit/Panels.subproj/IFAuthenticationPanel.m
+++ b/WebKit/Panels.subproj/IFAuthenticationPanel.m
@@ -7,6 +7,7 @@
 
 #import <WebKit/IFAuthenticationPanel.h>
 #import <WebKit/IFStandardPanelsPrivate.h>
+#import <WebKit/WebKitDebug.h>
 
 
 #define IFAuthenticationPanelNibName @"IFAuthenticationPanel"
@@ -113,6 +114,8 @@
 
 - (void)runAsSheetOnWindow:(NSWindow *)window withRequest:(IFAuthenticationRequest *)req
 {
+    WEBKIT_ASSERT(!usingSheet);
+
     [self setUpForRequest:req];
 
     usingSheet = TRUE;
@@ -124,12 +127,21 @@
 - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void  *)contextInfo
 {
     IFAuthenticationResult *result = nil;
+    IFAuthenticationRequest *req;
+
+    WEBKIT_ASSERT(usingSheet);
+    WEBKIT_ASSERT(request != nil);
+
     if (returnCode == 0) {
         result = [IFAuthenticationResult authenticationResultWithUsername:[username stringValue] password:[password stringValue]];
     }
 
-    [callback performSelector:selector withObject:request withObject:result];
-    [request release];
+    // We take this tricky approach to nilling out and releasing the request,
+    // because the callback below might remove our last ref.
+    req = request;
+    request = nil;
+    [callback performSelector:selector withObject:req withObject:result];
+    [req release];
 }
 
 @end
diff --git a/WebKit/Panels.subproj/IFPanelAuthenticationHandler.m b/WebKit/Panels.subproj/IFPanelAuthenticationHandler.m
index 6842d30..ba656f8 100644
--- a/WebKit/Panels.subproj/IFPanelAuthenticationHandler.m
+++ b/WebKit/Panels.subproj/IFPanelAuthenticationHandler.m
@@ -45,7 +45,7 @@ static NSString *IFModalDialogPretendWindow = @"IFModalDialogPretendWindow";
 
 -(void)startAuthentication:(IFAuthenticationRequest *)request
 {
-   id window = [[IFStandardPanels sharedStandardPanels] frontmostWindowLoadingURL:[request url]];
+    id window = [[IFStandardPanels sharedStandardPanels] frontmostWindowLoadingURL:[request url]];
 
     if (window == nil) {
         window = IFModalDialogPretendWindow;
diff --git a/WebKit/Panels.subproj/WebAuthenticationPanel.m b/WebKit/Panels.subproj/WebAuthenticationPanel.m
index 3a7cf57..ba1bb0f 100644
--- a/WebKit/Panels.subproj/WebAuthenticationPanel.m
+++ b/WebKit/Panels.subproj/WebAuthenticationPanel.m
@@ -7,6 +7,7 @@
 
 #import <WebKit/IFAuthenticationPanel.h>
 #import <WebKit/IFStandardPanelsPrivate.h>
+#import <WebKit/WebKitDebug.h>
 
 
 #define IFAuthenticationPanelNibName @"IFAuthenticationPanel"
@@ -113,6 +114,8 @@
 
 - (void)runAsSheetOnWindow:(NSWindow *)window withRequest:(IFAuthenticationRequest *)req
 {
+    WEBKIT_ASSERT(!usingSheet);
+
     [self setUpForRequest:req];
 
     usingSheet = TRUE;
@@ -124,12 +127,21 @@
 - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void  *)contextInfo
 {
     IFAuthenticationResult *result = nil;
+    IFAuthenticationRequest *req;
+
+    WEBKIT_ASSERT(usingSheet);
+    WEBKIT_ASSERT(request != nil);
+
     if (returnCode == 0) {
         result = [IFAuthenticationResult authenticationResultWithUsername:[username stringValue] password:[password stringValue]];
     }
 
-    [callback performSelector:selector withObject:request withObject:result];
-    [request release];
+    // We take this tricky approach to nilling out and releasing the request,
+    // because the callback below might remove our last ref.
+    req = request;
+    request = nil;
+    [callback performSelector:selector withObject:req withObject:result];
+    [req release];
 }
 
 @end
diff --git a/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m
index 6842d30..ba656f8 100644
--- a/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m
+++ b/WebKit/Panels.subproj/WebPanelAuthenticationHandler.m
@@ -45,7 +45,7 @@ static NSString *IFModalDialogPretendWindow = @"IFModalDialogPretendWindow";
 
 -(void)startAuthentication:(IFAuthenticationRequest *)request
 {
-   id window = [[IFStandardPanels sharedStandardPanels] frontmostWindowLoadingURL:[request url]];
+    id window = [[IFStandardPanels sharedStandardPanels] frontmostWindowLoadingURL:[request url]];
 
     if (window == nil) {
         window = IFModalDialogPretendWindow;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list