summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-24 08:34:34 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-07 02:41:15 -0800
commita374f380c053a1a8cb266cb3c6ebdf16618d8154 (patch)
treee08aeb01d3b99e00b09d3e4fc37e171b9954155c /UICaboodle
parent8a12607430c49711a957509c72036c76b0658dfd (diff)
Use _H<> for BrowserController::request_.
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.h2
-rw-r--r--UICaboodle/BrowserView.mm20
2 files changed, 6 insertions, 16 deletions
diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h
index f44e6ba..41b3d9d 100644
--- a/UICaboodle/BrowserView.h
+++ b/UICaboodle/BrowserView.h
@@ -71,7 +71,7 @@
NSURLAuthenticationChallenge *challenge_;
bool error_;
- NSURLRequest *request_;
+ _H<NSURLRequest> request_;
_transient NSNumber *sensitive_;
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm
index 9b0eda3..f354be8 100644
--- a/UICaboodle/BrowserView.mm
+++ b/UICaboodle/BrowserView.mm
@@ -480,9 +480,6 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
if (challenge_ != nil)
[challenge_ release];
- if (request_ != nil)
- [request_ release];
-
if (closer_ != nil)
[closer_ release];
@@ -504,11 +501,11 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
- (void) setURL:(NSURL *)url {
_assert(request_ == nil);
- request_ = [[NSURLRequest
+ request_ = [NSURLRequest
requestWithURL:url
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:DefaultTimeout_
- ] retain];
+ ];
}
- (void) loadURL:(NSURL *)url cachePolicy:(NSURLRequestCachePolicy)policy {
@@ -541,8 +538,7 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
NSMutableURLRequest *request([request_ mutableCopy]);
[request setCachePolicy:(cache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData)];
- [request_ autorelease];
- request_ = [request retain];
+ request_ = request;
if ([request_ HTTPBody] == nil && [request_ HTTPBodyStream] == nil)
[self loadRequest:request_];
@@ -671,14 +667,8 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
#endif
if ([frame parentFrame] == nil) {
- if (!error_) {
- if (request_ != nil)
- [request_ autorelease];
- if (request == nil)
- request_ = nil;
- else
- request_ = [request retain];
- }
+ if (!error_)
+ request_ = request;
}
}