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

Side by Side Diff: src/base/platform/platform-win32.cc

Issue 1411403011: Fix pointer truncation in 64-bit Windows builds (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git cl format Created 5 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 // Platform-specific code for Win32. 5 // Platform-specific code for Win32.
6 6
7 // Secure API functions are not available using MinGW with msvcrt.dll 7 // Secure API functions are not available using MinGW with msvcrt.dll
8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to
9 // disable definition of secure API functions in standard headers that 9 // disable definition of secure API functions in standard headers that
10 // would conflict with our own implementation. 10 // would conflict with our own implementation.
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 result.clear(); 1139 result.clear();
1140 return result; 1140 return result;
1141 } 1141 }
1142 } 1142 }
1143 int lib_name_length = WideCharToMultiByte( 1143 int lib_name_length = WideCharToMultiByte(
1144 CP_UTF8, 0, module_entry.szExePath, -1, NULL, 0, NULL, NULL); 1144 CP_UTF8, 0, module_entry.szExePath, -1, NULL, 0, NULL, NULL);
1145 std::string lib_name(lib_name_length, 0); 1145 std::string lib_name(lib_name_length, 0);
1146 WideCharToMultiByte(CP_UTF8, 0, module_entry.szExePath, -1, &lib_name[0], 1146 WideCharToMultiByte(CP_UTF8, 0, module_entry.szExePath, -1, &lib_name[0],
1147 lib_name_length, NULL, NULL); 1147 lib_name_length, NULL, NULL);
1148 result.push_back(OS::SharedLibraryAddress( 1148 result.push_back(OS::SharedLibraryAddress(
1149 lib_name, reinterpret_cast<unsigned int>(module_entry.modBaseAddr), 1149 lib_name, reinterpret_cast<uintptr_t>(module_entry.modBaseAddr),
1150 reinterpret_cast<unsigned int>(module_entry.modBaseAddr + 1150 reinterpret_cast<uintptr_t>(module_entry.modBaseAddr +
1151 module_entry.modBaseSize))); 1151 module_entry.modBaseSize)));
1152 cont = _Module32NextW(snapshot, &module_entry); 1152 cont = _Module32NextW(snapshot, &module_entry);
1153 } 1153 }
1154 CloseHandle(snapshot); 1154 CloseHandle(snapshot);
1155 1155
1156 symbols_loaded = true; 1156 symbols_loaded = true;
1157 return result; 1157 return result;
1158 } 1158 }
1159 1159
1160 1160
1161 std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { 1161 std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 1392
1393 1393
1394 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 1394 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
1395 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); 1395 BOOL result = TlsSetValue(static_cast<DWORD>(key), value);
1396 USE(result); 1396 USE(result);
1397 DCHECK(result); 1397 DCHECK(result);
1398 } 1398 }
1399 1399
1400 } // namespace base 1400 } // namespace base
1401 } // namespace v8 1401 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698