From eea75e8f60446a55ae35f9d2c87e4d3879d365af Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 5 Mar 2011 05:19:54 -0800 Subject: runJavaScript*Panel during popViewController has self dealloc. --- CyteKit/WebView.mm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CyteKit') diff --git a/CyteKit/WebView.mm b/CyteKit/WebView.mm index dd72f5a..608e9e2 100644 --- a/CyteKit/WebView.mm +++ b/CyteKit/WebView.mm @@ -264,6 +264,7 @@ static NSURLRequest *$UIWebViewWebViewDelegate$webView$resource$willSendRequest$ // }}} // webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame: (2.1+) {{{ - (void) webView:(WebView *)view runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame { + [[self retain] autorelease]; id delegate([self delegate]); if ([UIWebView instancesRespondToSelector:@selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:)]) if ( @@ -275,6 +276,7 @@ static NSURLRequest *$UIWebViewWebViewDelegate$webView$resource$willSendRequest$ // }}} // webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame: (2.1+) {{{ - (BOOL) webView:(WebView *)view runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame { + [[self retain] autorelease]; id delegate([self delegate]); if ([UIWebView instancesRespondToSelector:@selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:)]) if ( @@ -287,6 +289,7 @@ static NSURLRequest *$UIWebViewWebViewDelegate$webView$resource$willSendRequest$ // }}} // webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame: (2.1+) {{{ - (NSString *) webView:(WebView *)view runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)text initiatedByFrame:(WebFrame *)frame { + [[self retain] autorelease]; id delegate([self delegate]); if ([UIWebView instancesRespondToSelector:@selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:)]) if ( -- cgit v1.2.3