summaryrefslogtreecommitdiffstats
path: root/extensions/utility
diff options
context:
space:
mode:
authorsammc <sammc@chromium.org>2015-07-28 18:52:23 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-29 01:52:57 +0000
commit6a2e8d4d42cd4c15755d338313b94cdf308219fe (patch)
treeed5eb2a5d035ee2dd62338fa8742e885a89ea2ad /extensions/utility
parentf849988a165627d8d1d4cbe88193d46b2a8a9ec1 (diff)
downloadchromium_src-6a2e8d4d42cd4c15755d338313b94cdf308219fe.zip
chromium_src-6a2e8d4d42cd4c15755d338313b94cdf308219fe.tar.gz
chromium_src-6a2e8d4d42cd4c15755d338313b94cdf308219fe.tar.bz2
Initialize blink only when needed in utility processes.
Currently, in a utility process containing a v8 proxy resolver, both blink and the proxy resolver attempt to use v8 in incompatible ways, causing a crash on shutdown. This cl changes the utility process to only initialize blink when needed. On Windows, initializing blink with v8 before enabling the sandbox calls RtlGenRandom(), which leaves it available from within the sandbox. To avoid breaking base::RandBytes(), this cl also adds a call to base::RandBytes before enabling the sandbox. BUG=506439 Review URL: https://codereview.chromium.org/1251823002 Cr-Commit-Position: refs/heads/master@{#340835}
Diffstat (limited to 'extensions/utility')
-rw-r--r--extensions/utility/utility_handler.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/extensions/utility/utility_handler.cc b/extensions/utility/utility_handler.cc
index 65cf509..f3c8a8c 100644
--- a/extensions/utility/utility_handler.cc
+++ b/extensions/utility/utility_handler.cc
@@ -99,6 +99,7 @@ void UtilityHandler::OnUnpackExtension(
CHECK_GT(location, Manifest::INVALID_LOCATION);
CHECK_LT(location, Manifest::NUM_LOCATIONS);
DCHECK(ExtensionsClient::Get());
+ content::UtilityThread::Get()->EnsureBlinkInitialized();
base::FilePath working_dir = extension_path.DirName();
base::FilePath unzipped_dir = working_dir.AppendASCII(kTempExtensionName);
base::string16 error;