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

Side by Side Diff: content/common/sandbox_win.cc

Issue 1284083002: Print stack traces in child processes when browser tests failed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/sandbox_win.h" 5 #include "content/common/sandbox_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 base::FilePath debug_message(long_path_buf); 322 base::FilePath debug_message(long_path_buf);
323 debug_message = debug_message.AppendASCII("debug_message.exe"); 323 debug_message = debug_message.AppendASCII("debug_message.exe");
324 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_PROCESS, 324 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_PROCESS,
325 sandbox::TargetPolicy::PROCESS_MIN_EXEC, 325 sandbox::TargetPolicy::PROCESS_MIN_EXEC,
326 debug_message.value().c_str()); 326 debug_message.value().c_str());
327 if (result != sandbox::SBOX_ALL_OK) 327 if (result != sandbox::SBOX_ALL_OK)
328 return false; 328 return false;
329 #endif // NDEBUG 329 #endif // NDEBUG
330 330
331 // Add the policy for read-only PDB file access for AddressSanitizer. 331 // Add the policy for read-only PDB file access for stack traces.
332 #if defined(ADDRESS_SANITIZER) 332 #if !defined(OFFICIAL_BUILD)
333 base::FilePath exe; 333 base::FilePath exe;
334 if (!PathService::Get(base::FILE_EXE, &exe)) 334 if (!PathService::Get(base::FILE_EXE, &exe))
335 return false; 335 return false;
336 base::FilePath pdb_path = exe.DirName().Append(L"*.pdb"); 336 base::FilePath pdb_path = exe.DirName().Append(L"*.pdb");
337 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, 337 result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
338 sandbox::TargetPolicy::FILES_ALLOW_READONLY, 338 sandbox::TargetPolicy::FILES_ALLOW_READONLY,
339 pdb_path.value().c_str()); 339 pdb_path.value().c_str());
340 if (result != sandbox::SBOX_ALL_OK) 340 if (result != sandbox::SBOX_ALL_OK)
341 return false; 341 return false;
342 #endif 342 #endif
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 } 827 }
828 828
829 return false; 829 return false;
830 } 830 }
831 831
832 bool BrokerAddTargetPeer(HANDLE peer_process) { 832 bool BrokerAddTargetPeer(HANDLE peer_process) {
833 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK; 833 return g_broker_services->AddTargetPeer(peer_process) == sandbox::SBOX_ALL_OK;
834 } 834 }
835 835
836 } // namespace content 836 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698