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

Side by Side Diff: components/nacl/loader/nacl_main_platform_delegate_win.cc

Issue 1291553003: Print stack traces in child processes when browser tests failed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch 1295823002 which fixes the console coming up on Win8+ and adds regression tests Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/nacl/loader/nacl_main_platform_delegate.h" 5 #include "components/nacl/loader/nacl_main_platform_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/public/common/main_function_params.h" 8 #include "content/public/common/main_function_params.h"
9 #include "sandbox/win/src/sandbox.h" 9 #include "sandbox/win/src/sandbox.h"
10 10
11 void NaClMainPlatformDelegate::EnableSandbox( 11 void NaClMainPlatformDelegate::EnableSandbox(
12 const content::MainFunctionParams& parameters) { 12 const content::MainFunctionParams& parameters) {
13 sandbox::TargetServices* target_services = 13 sandbox::TargetServices* target_services =
14 parameters.sandbox_info->target_services; 14 parameters.sandbox_info->target_services;
15 15
16 CHECK(target_services) << "NaCl-Win EnableSandbox: No Target Services!"; 16 CHECK(target_services) << "NaCl-Win EnableSandbox: No Target Services!";
17 // Cause advapi32 to load before the sandbox is turned on. 17 // Cause advapi32 to load before the sandbox is turned on.
18 unsigned int dummy_rand; 18 unsigned int dummy_rand;
19 rand_s(&dummy_rand); 19 rand_s(&dummy_rand);
20 // Warm up language subsystems before the sandbox is turned on. 20 // Warm up language subsystems before the sandbox is turned on.
21 ::GetUserDefaultLangID(); 21 ::GetUserDefaultLangID();
22 ::GetUserDefaultLCID(); 22 ::GetUserDefaultLCID();
23 23
24 #if defined(ADDRESS_SANITIZER)
25 // Bind and leak dbghelp.dll before the token is lowered, otherwise
26 // AddressSanitizer will crash when trying to symbolize a report.
27 CHECK(LoadLibraryA("dbghelp.dll"));
28 #endif
29
30 // Turn the sandbox on. 24 // Turn the sandbox on.
31 target_services->LowerToken(); 25 target_services->LowerToken();
32 } 26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698