diff options
author | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-04 23:33:21 +0000 |
---|---|---|
committer | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-04 23:33:21 +0000 |
commit | e8e91e94221aa7d141ba40a63c87d9b1eb9f9486 (patch) | |
tree | bb5b81f062d64684faa2947dcf55e304e94ebc69 /content | |
parent | 8a28cadd4e088407959dd8b28578bd3beafd4711 (diff) | |
download | chromium_src-e8e91e94221aa7d141ba40a63c87d9b1eb9f9486.zip chromium_src-e8e91e94221aa7d141ba40a63c87d9b1eb9f9486.tar.gz chromium_src-e8e91e94221aa7d141ba40a63c87d9b1eb9f9486.tar.bz2 |
Fix incorrect test for 32 bit NaCl sandbox on Windows.
BUG=none
TEST=existing
Code that reserves a contiguous block of 1GB on 32 bit Windows systems is
being invoked on 64 bit systems as well. Change the test to use the NACL_WIN64
define since we know at build time whether the code is for Win32 or WOW64.
Review URL: https://chromiumcodereview.appspot.com/10365025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135485 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/sandbox_policy.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/content/common/sandbox_policy.cc b/content/common/sandbox_policy.cc index 1bd1e4f..d13fedb 100644 --- a/content/common/sandbox_policy.cc +++ b/content/common/sandbox_policy.cc @@ -635,15 +635,14 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line, return 0; } +#if !defined(NACL_WIN64) // For Native Client sel_ldr processes on 32-bit Windows, reserve 1 GB of // address space to prevent later failure due to address space fragmentation // from .dll loading. The NaCl process will attempt to locate this space by // scanning the address space using VirtualQuery. // TODO(bbudge) Handle the --no-sandbox case. // http://code.google.com/p/nativeclient/issues/detail?id=2131 - if (type == content::PROCESS_TYPE_NACL_LOADER && - (base::win::OSInfo::GetInstance()->wow64_status() == - base::win::OSInfo::WOW64_DISABLED)) { + if (type == content::PROCESS_TYPE_NACL_LOADER) { const SIZE_T kOneGigabyte = 1 << 30; void* nacl_mem = VirtualAllocEx(target.process_handle(), NULL, @@ -654,6 +653,7 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line, DLOG(WARNING) << "Failed to reserve address space for Native Client"; } } +#endif // !defined(NACL_WIN64) ResumeThread(target.thread_handle()); |