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

Side by Side Diff: sandbox/win/tests/common/controller.cc

Issue 868253011: Make chrome.exe built with ASan/Win work with sandbox enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scoped stuff Created 5 years, 10 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 "sandbox/win/tests/common/controller.h" 5 #include "sandbox/win/tests/common/controller.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 TargetServices* target = SandboxFactory::GetTargetServices(); 318 TargetServices* target = SandboxFactory::GetTargetServices();
319 if (target) { 319 if (target) {
320 if (SBOX_ALL_OK != target->Init()) 320 if (SBOX_ALL_OK != target->Init())
321 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; 321 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
322 322
323 if (BEFORE_REVERT == state) 323 if (BEFORE_REVERT == state)
324 return command(argc - 4, argv + 4); 324 return command(argc - 4, argv + 4);
325 else if (EVERY_STATE == state) 325 else if (EVERY_STATE == state)
326 command(argc - 4, argv + 4); 326 command(argc - 4, argv + 4);
327 327
328 #if defined(ADDRESS_SANITIZER)
329 // Bind and leak dbghelp.dll before the token is lowered, otherwise
330 // AddressSanitizer will crash when trying to symbolize a report.
331 if (!LoadLibraryA("dbghelp.dll"))
332 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
333 #endif
334
328 target->LowerToken(); 335 target->LowerToken();
329 } else if (0 != _wcsicmp(argv[1], L"-child-no-sandbox")) { 336 } else if (0 != _wcsicmp(argv[1], L"-child-no-sandbox")) {
330 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND; 337 return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
331 } 338 }
332 339
333 return command(argc - 4, argv + 4); 340 return command(argc - 4, argv + 4);
334 } 341 }
335 342
336 } // namespace sandbox 343 } // namespace sandbox
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698