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

Unified Diff: base/sys_info_posix.cc

Issue 1542013005: Add a new driver bug workaround SANDBOX_START_EARLY Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add support for gn build Created 4 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 | « .gn ('k') | build/config/linux/dri/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_posix.cc
diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc
index 85ae039118986d211ea3964e38f271c4beb3a026..0ed9065ef9f03d4890856652490f8c2ee95c91b4 100644
--- a/base/sys_info_posix.cc
+++ b/base/sys_info_posix.cc
@@ -113,8 +113,8 @@ std::string SysInfo::OperatingSystemName() {
#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
// static
std::string SysInfo::OperatingSystemVersion() {
- struct utsname info;
- if (uname(&info) < 0) {
+ static struct utsname info = {};
+ if (!strlen(info.release) && uname(&info) < 0) {
piman 2016/05/06 19:53:11 This is not thread safe. Why the change?
Julien Isorce Samsung 2016/05/07 08:18:13 Txh for pointing that, well I made this change bec
NOTREACHED();
return std::string();
}
« no previous file with comments | « .gn ('k') | build/config/linux/dri/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698