OLD | NEW |
---|---|
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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
406 LoadLibraryA("amdhcp64.dll"); | 406 LoadLibraryA("amdhcp64.dll"); |
407 #else | 407 #else |
408 LoadLibraryA("amdhcp32.dll"); | 408 LoadLibraryA("amdhcp32.dll"); |
409 #endif | 409 #endif |
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); |
Timur Iskhodzhanov
2015/02/03 13:25:22
e.g. here and inside WarmupWindowsLocales
| |
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 Loading... | |
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 |
OLD | NEW |