Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: ios/web/web_state/ui/crw_web_controller_container_view.mm

Issue 1155613008: [iOS] Fix static analyzer warning in web controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller_container_view.mm
diff --git a/ios/web/web_state/ui/crw_web_controller_container_view.mm b/ios/web/web_state/ui/crw_web_controller_container_view.mm
index 9da506a4acd9ca6e1e4ec820d28c7de1e7da0b2c..ffa55714135b4663110bc82e68f0de2ec510ba8b 100644
--- a/ios/web/web_state/ui/crw_web_controller_container_view.mm
+++ b/ios/web/web_state/ui/crw_web_controller_container_view.mm
@@ -117,7 +117,7 @@
- (void)setToolbarContainerView:(CRWToolbarContainerView*)toolbarContainerView {
if (![_toolbarContainerView isEqual:toolbarContainerView]) {
[_toolbarContainerView removeFromSuperview];
- _toolbarContainerView.reset(toolbarContainerView);
+ _toolbarContainerView.reset([toolbarContainerView retain]);
[self addSubview:_toolbarContainerView];
}
}
@@ -147,8 +147,8 @@
- (void)addToolbar:(UIView*)toolbar {
// Create toolbar container if necessary.
if (!self.toolbarContainerView) {
- self.toolbarContainerView =
- [[CRWToolbarContainerView alloc] initWithFrame:CGRectZero];
+ self.toolbarContainerView = [
+ [[CRWToolbarContainerView alloc] initWithFrame:CGRectZero] autorelease];
}
// Add the toolbar to the container.
[self.toolbarContainerView addToolbar:toolbar];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698