diff options
author | jif <jif@chromium.org> | 2015-06-09 10:43:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-09 17:43:56 +0000 |
commit | dcbfdd3e1289eb4f0b38fde85e654341c19e72e5 (patch) | |
tree | 1cb02a40a058c5f8bd43f4c2202f30e4283be3d3 /ios/web | |
parent | 603e4a3cb1033dc2bf680aa0608a2016b6c673fb (diff) | |
download | chromium_src-dcbfdd3e1289eb4f0b38fde85e654341c19e72e5.zip chromium_src-dcbfdd3e1289eb4f0b38fde85e654341c19e72e5.tar.gz chromium_src-dcbfdd3e1289eb4f0b38fde85e654341c19e72e5.tar.bz2 |
Upstreaming: fix use-after-free and mirror enum change in content//
1/ SECURITY_STYLE_WARNING was added to
content/public/common/security_style.h in
https://codereview.chromium.org/1162663004
This is mirrored in ios/web/public/security_style.h to fix the
downstream build.
2/ In crw_web_controller.mm, the reference wasn't copied before
being passed to the block.
BUG=None.
Review URL: https://codereview.chromium.org/1173523005
Cr-Commit-Position: refs/heads/master@{#333519}
Diffstat (limited to 'ios/web')
-rw-r--r-- | ios/web/net/request_tracker_impl.mm | 3 | ||||
-rw-r--r-- | ios/web/public/security_style.h | 5 | ||||
-rw-r--r-- | ios/web/web_state/ui/crw_web_controller.mm | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/ios/web/net/request_tracker_impl.mm b/ios/web/net/request_tracker_impl.mm index 0732538..4854fda 100644 --- a/ios/web/net/request_tracker_impl.mm +++ b/ios/web/net/request_tracker_impl.mm @@ -314,6 +314,9 @@ struct TrackerCounts { case web::SECURITY_STYLE_AUTHENTICATION_BROKEN: sslInfo = @"Not secure "; break; + case web::SECURITY_STYLE_WARNING: + sslInfo = @"Security warning"; + break; case web::SECURITY_STYLE_AUTHENTICATED: if (status_.content_status == web::SSLStatus::DISPLAYED_INSECURE_CONTENT) diff --git a/ios/web/public/security_style.h b/ios/web/public/security_style.h index a2fbf84..a72396c 100644 --- a/ios/web/public/security_style.h +++ b/ios/web/public/security_style.h @@ -28,6 +28,11 @@ enum SecurityStyle { // this object in an authenticated manner but were unable to do so. SECURITY_STYLE_AUTHENTICATION_BROKEN, + // SECURITY_STYLE_WARNING means that the object was retrieved in an + // authenticated manner, but there were security issues with the retrieval or + // the object interacted with less secure objects. + SECURITY_STYLE_WARNING, + // SECURITY_STYLE_AUTHENTICATED indicates that we successfully retrieved this // object over an authenticated protocol, such as HTTPS. SECURITY_STYLE_AUTHENTICATED, diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm index cc0e66a5..da8309f 100644 --- a/ios/web/web_state/ui/crw_web_controller.mm +++ b/ios/web/web_state/ui/crw_web_controller.mm @@ -3382,9 +3382,11 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5; if (!scrollState.IsValid()) return; base::WeakNSObject<CRWWebController> weakSelf(self); + web::PageScrollState scrollStateCopy = scrollState; [self queryUserScalableProperty:^(BOOL isUserScalable) { base::scoped_nsobject<CRWWebController> strongSelf([weakSelf retain]); - [strongSelf applyPageScrollState:scrollState userScalable:isUserScalable]; + [strongSelf applyPageScrollState:scrollStateCopy + userScalable:isUserScalable]; }]; } |