From 6a2e8d4d42cd4c15755d338313b94cdf308219fe Mon Sep 17 00:00:00 2001 From: sammc Date: Tue, 28 Jul 2015 18:52:23 -0700 Subject: 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} --- extensions/utility/utility_handler.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'extensions/utility') 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; -- cgit v1.1