OLD | NEW |
---|---|
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 Loading... | |
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))); |
Jarin
2015/11/09 05:05:07
Nit: Fix formatting, please. (If you use git cl fo
| |
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 Loading... | |
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 |
OLD | NEW |