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

Side by Side Diff: content/ppapi_plugin/ppapi_thread.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: one more EXPECT turned into ASSERT 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 "content/ppapi_plugin/ppapi_thread.h" 5 #include "content/ppapi_plugin/ppapi_thread.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/cpu.h" 10 #include "base/cpu.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 } 410 }
411 } 411 }
412 } 412 }
413 413
414 // Cause advapi32 to load before the sandbox is turned on. 414 // Cause advapi32 to load before the sandbox is turned on.
415 unsigned int dummy_rand; 415 unsigned int dummy_rand;
416 rand_s(&dummy_rand); 416 rand_s(&dummy_rand);
417 417
418 WarmupWindowsLocales(permissions); 418 WarmupWindowsLocales(permissions);
419 419
420 #if defined(ADDRESS_SANITIZER)
421 // Bind and leak dbghelp.dll before the token is lowered, otherwise
422 // AddressSanitizer will crash when trying to symbolize a report.
423 LoadLibraryA("dbghelp.dll");
424 #endif
425
420 g_target_services->LowerToken(); 426 g_target_services->LowerToken();
421 } 427 }
422 #endif 428 #endif
423 429
424 if (is_broker_) { 430 if (is_broker_) {
425 // Get the InitializeBroker function (required). 431 // Get the InitializeBroker function (required).
426 InitializeBrokerFunc init_broker = 432 InitializeBrokerFunc init_broker =
427 reinterpret_cast<InitializeBrokerFunc>( 433 reinterpret_cast<InitializeBrokerFunc>(
428 library.GetFunctionPointer("PPP_InitializeBroker")); 434 library.GetFunctionPointer("PPP_InitializeBroker"));
429 if (!init_broker) { 435 if (!init_broker) {
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") + 606 std::string("Plugin.Ppapi") + (is_broker_ ? "Broker" : "Plugin") +
601 "LoadErrorCode_" + path.BaseName().MaybeAsASCII(); 607 "LoadErrorCode_" + path.BaseName().MaybeAsASCII();
602 608
603 // For sparse histograms, we can use the macro, as it does not incorporate a 609 // For sparse histograms, we can use the macro, as it does not incorporate a
604 // static. 610 // static.
605 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code); 611 UMA_HISTOGRAM_SPARSE_SLOWLY(histogram_name, error.code);
606 #endif 612 #endif
607 } 613 }
608 614
609 } // namespace content 615 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698