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

Unified Diff: content/renderer/manifest/manifest_parser.cc

Issue 1246953002: content: make theme_color more resilient to casting issues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 5 years, 5 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
Index: content/renderer/manifest/manifest_parser.cc
diff --git a/content/renderer/manifest/manifest_parser.cc b/content/renderer/manifest/manifest_parser.cc
index 6b021d2a7a30286f1cbd292e161a3c5e5f495f71..e5b0fb8d71c53935099846e4d9dc21b7a036c1a8 100644
--- a/content/renderer/manifest/manifest_parser.cc
+++ b/content/renderer/manifest/manifest_parser.cc
@@ -427,7 +427,8 @@ int64_t ManifestParser::ParseThemeColor(
return Manifest::kInvalidOrMissingThemeColor;
}
- return static_cast<int64_t>(color);
+ int32_t signedColor = reinterpret_cast<int32_t&>(color);
Bernhard Bauer 2015/07/31 09:58:56 Local variables are unix_hacker_style. Also, can y
Lalit Maganti 2015/07/31 10:04:37 Done.
+ return static_cast<int64_t>(signedColor);
}
base::NullableString16 ManifestParser::ParseGCMSenderID(

Powered by Google App Engine
This is Rietveld 408576698