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

Unified Diff: ios/web/navigation/nscoder_util.mm

Issue 1023013002: Minor cleanup in ios/web utils (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 5 years, 9 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 | « ios/web/history_state_util_unittest.mm ('k') | ios/web/web_state/blocked_popup_info.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/nscoder_util.mm
diff --git a/ios/web/navigation/nscoder_util.mm b/ios/web/navigation/nscoder_util.mm
index 551dccd27a09697dffb0fe0f3fd956c60e206b06..9218f37ff4a9a561bd2e254df4a2609bda4a6dd4 100644
--- a/ios/web/navigation/nscoder_util.mm
+++ b/ios/web/navigation/nscoder_util.mm
@@ -16,7 +16,7 @@ void EncodeString(NSCoder* coder, NSString* key, const std::string& string) {
}
std::string DecodeString(NSCoder* decoder, NSString* key) {
- NSUInteger length;
+ NSUInteger length = 0;
const uint8_t* bytes = [decoder decodeBytesForKey:key returnedLength:&length];
return std::string(reinterpret_cast<const char*>(bytes), length);
}
« no previous file with comments | « ios/web/history_state_util_unittest.mm ('k') | ios/web/web_state/blocked_popup_info.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698