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

Issue 6185005: NSS: don't set environment variables when multi-threaded. (Closed)

Created:
9 years, 11 months ago by agl
Modified:
9 years, 7 months ago
Reviewers:
wtc
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

NSS: don't set environment variables when multi-threaded. We can't alter the envionment once we have gone multithreaded because glibc's getenv doesn't take the environment lock. Thus we add an EarlyNSSInit() function which can do so, early in startup. BUG=66835 TEST=ThreadSanitizer

Patch Set 1 #

Total comments: 3

Patch Set 2 : ... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -0 lines) Patch
M base/nss_util.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M base/nss_util.cc View 1 3 chunks +14 lines, -0 lines 0 comments Download
M chrome/app/chrome_main.cc View 1 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
agl
9 years, 11 months ago (2011-01-12 16:54:20 UTC) #1
wtc
9 years, 11 months ago (2011-01-13 00:07:02 UTC) #2
LGTM.  I suggested some changes below.

http://codereview.chromium.org/6185005/diff/1/base/nss_util.cc
File base/nss_util.cc (right):

http://codereview.chromium.org/6185005/diff/1/base/nss_util.cc#newcode330
base/nss_util.cc:330: #if defined(OS_LINUX)
This ifdef should be
    #if defined(USE_NSS)
to match the ifdef at lines 215-227.

http://codereview.chromium.org/6185005/diff/1/base/nss_util.h
File base/nss_util.h (right):

http://codereview.chromium.org/6185005/diff/1/base/nss_util.h#newcode25
base/nss_util.h:25: void EarlyNSSInit();
The comment should point out that this function doesn't initialize NSS.

Please rename this function EarlySetupForNSSInit (or something along that line).

http://codereview.chromium.org/6185005/diff/1/chrome/app/chrome_main.cc
File chrome/app/chrome_main.cc (right):

http://codereview.chromium.org/6185005/diff/1/chrome/app/chrome_main.cc#newco...
chrome/app/chrome_main.cc:718: base::EarlyNSSInit();
Nit: since EarlyNSSInit doesn't use the Chrome path provider, it seems
that we can call EarlyNSSInit earlier, immediately after the SecupCRT call
at line 712.

At least, we should not call EarlyNSSInit in the middle of the code block
that sets up the Chrome path provider (lines 714-724).

Powered by Google App Engine
This is Rietveld 408576698