diff options
author | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 17:09:38 +0000 |
---|---|---|
committer | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-04 17:09:38 +0000 |
commit | 183a50dfa9ff9fb985560d274fac713738e3c49e (patch) | |
tree | 54c26fcd3d8bc0216cf49f07a4181882c7c3fe49 | |
parent | e29c1785fc2f5cddd4e3db459588f41b6a7a3863 (diff) | |
download | chromium_src-183a50dfa9ff9fb985560d274fac713738e3c49e.zip chromium_src-183a50dfa9ff9fb985560d274fac713738e3c49e.tar.gz chromium_src-183a50dfa9ff9fb985560d274fac713738e3c49e.tar.bz2 |
Add support for 64-bit Windows build: base and chrome/app
This is required to support Native Client on 64-bit Windows.
Native Client will use a small 64-bit executable to load NaCl modules on 64-bit Windows. This 64-bit executable will use Chrome code, but some functionality has to be removed to minimize dependencies. This functionality may be enabled later if we decide that it is necessary.
TEST=None
BUG=28176
Review URL: http://codereview.chromium.org/371073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33823 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/file_util_win.cc | 4 | ||||
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 3 | ||||
-rw-r--r-- | chrome/app/chrome_exe_main.cc | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index 812a706..9fae6a39 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -805,8 +805,10 @@ bool MemoryMappedFile::MapFileToMemoryInternal() { if (length_ == INVALID_FILE_SIZE) return false; + // length_ value comes from GetFileSize() above. GetFileSize() returns DWORD, + // therefore the cast here is safe. file_mapping_ = ::CreateFileMapping(file_, NULL, PAGE_READONLY, - 0, length_, NULL); + 0, static_cast<DWORD>(length_), NULL); if (file_mapping_ == INVALID_HANDLE_VALUE) return false; diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 7fa4e4e..e83e07d 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -88,6 +88,9 @@ extern int NaClMain(const MainFunctionParams&); extern int UtilityMain(const MainFunctionParams&); extern int ProfileImportMain(const MainFunctionParams&); extern int ZygoteMain(const MainFunctionParams&); +#ifdef NACL_WIN64 +extern int NaClBrokerMain(const MainFunctionParams&); +#endif #if defined(OS_WIN) // TODO(erikkay): isn't this already defined somewhere? diff --git a/chrome/app/chrome_exe_main.cc b/chrome/app/chrome_exe_main.cc index c0d1769..cd1f1b3 100644 --- a/chrome/app/chrome_exe_main.cc +++ b/chrome/app/chrome_exe_main.cc @@ -33,6 +33,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { // Initialize the sandbox services. sandbox::SandboxInterfaceInfo sandbox_info = {0}; +#ifndef _WIN64 // Sandbox does not support Win64 yet - remove when it does sandbox_info.broker_services = sandbox::SandboxFactory::GetBrokerServices(); if (!sandbox_info.broker_services) sandbox_info.target_services = sandbox::SandboxFactory::GetTargetServices(); @@ -41,7 +42,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { // Enforces strong DEP support. Vista uses the NXCOMPAT flag in the exe. sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED); } - +#endif // _WIN64 // Load and launch the chrome dll. *Everything* happens inside. MainDllLoader* loader = MakeMainDllLoader(); int rc = loader->Launch(instance, &sandbox_info); |