mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
fix naive
This commit is contained in:
parent
afcc2cfdd9
commit
cbd37760e8
@ -10,9 +10,6 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/allocator/allocator_check.h"
|
|
||||||
#include "base/allocator/partition_alloc_support.h"
|
|
||||||
#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h"
|
|
||||||
#include "base/at_exit.h"
|
#include "base/at_exit.h"
|
||||||
#include "base/check.h"
|
#include "base/check.h"
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
@ -82,6 +79,12 @@
|
|||||||
#include "base/apple/scoped_nsautorelease_pool.h"
|
#include "base/apple/scoped_nsautorelease_pool.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||||
|
#include "base/allocator/allocator_check.h"
|
||||||
|
#include "base/allocator/partition_alloc_support.h"
|
||||||
|
#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr int kListenBackLog = 512;
|
constexpr int kListenBackLog = 512;
|
||||||
@ -305,9 +308,12 @@ int main(int argc, char* argv[]) {
|
|||||||
// content/app/content_main.cc: RunContentProcess()
|
// content/app/content_main.cc: RunContentProcess()
|
||||||
// content/app/content_main_runner_impl.cc: Initialize()
|
// content/app/content_main_runner_impl.cc: Initialize()
|
||||||
base::AtExitManager exit_manager;
|
base::AtExitManager exit_manager;
|
||||||
|
|
||||||
|
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||||
std::string process_type = "";
|
std::string process_type = "";
|
||||||
base::allocator::PartitionAllocSupport::Get()->ReconfigureEarlyish(
|
base::allocator::PartitionAllocSupport::Get()->ReconfigureEarlyish(
|
||||||
process_type);
|
process_type);
|
||||||
|
#endif
|
||||||
|
|
||||||
// content/app/content_main.cc: RunContentProcess()
|
// content/app/content_main.cc: RunContentProcess()
|
||||||
// content/app/content_main_runner_impl.cc: Initialize()
|
// content/app/content_main_runner_impl.cc: Initialize()
|
||||||
@ -315,21 +321,27 @@ int main(int argc, char* argv[]) {
|
|||||||
// with PartitionAlloc on most platforms) smoke-tests that the overriding
|
// with PartitionAlloc on most platforms) smoke-tests that the overriding
|
||||||
// logic is working correctly. If not causes a hard crash, as its unexpected
|
// logic is working correctly. If not causes a hard crash, as its unexpected
|
||||||
// absence has security implications.
|
// absence has security implications.
|
||||||
|
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||||
CHECK(base::allocator::IsAllocatorInitialized());
|
CHECK(base::allocator::IsAllocatorInitialized());
|
||||||
|
#endif
|
||||||
|
|
||||||
// content/app/content_main.cc: RunContentProcess()
|
// content/app/content_main.cc: RunContentProcess()
|
||||||
// content/app/content_main_runner_impl.cc: Run()
|
// content/app/content_main_runner_impl.cc: Run()
|
||||||
base::FeatureList::InitInstance("PartitionConnectionsByNetworkIsolationKey",
|
base::FeatureList::InitInstance("PartitionConnectionsByNetworkIsolationKey",
|
||||||
std::string());
|
std::string());
|
||||||
|
|
||||||
|
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||||
base::allocator::PartitionAllocSupport::Get()
|
base::allocator::PartitionAllocSupport::Get()
|
||||||
->ReconfigureAfterFeatureListInit(/*process_type=*/"");
|
->ReconfigureAfterFeatureListInit(/*process_type=*/"");
|
||||||
|
#endif
|
||||||
|
|
||||||
base::SingleThreadTaskExecutor io_task_executor(base::MessagePumpType::IO);
|
base::SingleThreadTaskExecutor io_task_executor(base::MessagePumpType::IO);
|
||||||
base::ThreadPoolInstance::CreateAndStartWithDefaultParams("naive");
|
base::ThreadPoolInstance::CreateAndStartWithDefaultParams("naive");
|
||||||
|
|
||||||
|
#if PA_BUILDFLAG(USE_PARTITION_ALLOC)
|
||||||
base::allocator::PartitionAllocSupport::Get()->ReconfigureAfterTaskRunnerInit(
|
base::allocator::PartitionAllocSupport::Get()->ReconfigureAfterTaskRunnerInit(
|
||||||
process_type);
|
process_type);
|
||||||
|
#endif
|
||||||
|
|
||||||
url::AddStandardScheme("quic",
|
url::AddStandardScheme("quic",
|
||||||
url::SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION);
|
url::SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION);
|
||||||
|
Loading…
Reference in New Issue
Block a user