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..9ce89107f28011091e1e21487f685e0ac4065294 100644 |
--- a/content/renderer/manifest/manifest_parser.cc |
+++ b/content/renderer/manifest/manifest_parser.cc |
@@ -427,7 +427,11 @@ int64_t ManifestParser::ParseThemeColor( |
return Manifest::kInvalidOrMissingThemeColor; |
} |
- return static_cast<int64_t>(color); |
+ // We do this here because Java does not have an unsigned int32 type so colors |
+ // with high alpha values will be negative. Instead of doing the conversion |
+ // after we pass over to Java, we do it here as it is easier and clearer. |
+ int32_t signed_color = reinterpret_cast<int32_t&>(color); |
+ return static_cast<int64_t>(signed_color); |
} |
base::NullableString16 ManifestParser::ParseGCMSenderID( |