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

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

Issue 2758563002: [gn] Enable stricter build flags (Closed)
Patch Set: Address comment Created 3 years, 9 months 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 | « src/base/platform/mutex.cc ('k') | src/compiler/gap-resolver.cc » ('j') | 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 809
810 810
811 void OS::Guard(void* address, const size_t size) { 811 void OS::Guard(void* address, const size_t size) {
812 DWORD oldprotect; 812 DWORD oldprotect;
813 VirtualProtect(address, size, PAGE_NOACCESS, &oldprotect); 813 VirtualProtect(address, size, PAGE_NOACCESS, &oldprotect);
814 } 814 }
815 815
816 void OS::Unprotect(void* address, const size_t size) { 816 void OS::Unprotect(void* address, const size_t size) {
817 LPVOID result = VirtualAlloc(address, size, MEM_COMMIT, PAGE_READWRITE); 817 LPVOID result = VirtualAlloc(address, size, MEM_COMMIT, PAGE_READWRITE);
818 DCHECK_IMPLIES(result != nullptr, GetLastError() == 0); 818 DCHECK_IMPLIES(result != nullptr, GetLastError() == 0);
819 USE(result);
819 } 820 }
820 821
821 void OS::Sleep(TimeDelta interval) { 822 void OS::Sleep(TimeDelta interval) {
822 ::Sleep(static_cast<DWORD>(interval.InMilliseconds())); 823 ::Sleep(static_cast<DWORD>(interval.InMilliseconds()));
823 } 824 }
824 825
825 826
826 void OS::Abort() { 827 void OS::Abort() {
827 if (g_hard_abort) { 828 if (g_hard_abort) {
828 V8_IMMEDIATE_CRASH(); 829 V8_IMMEDIATE_CRASH();
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 1393
1393 1394
1394 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 1395 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
1395 BOOL result = TlsSetValue(static_cast<DWORD>(key), value); 1396 BOOL result = TlsSetValue(static_cast<DWORD>(key), value);
1396 USE(result); 1397 USE(result);
1397 DCHECK(result); 1398 DCHECK(result);
1398 } 1399 }
1399 1400
1400 } // namespace base 1401 } // namespace base
1401 } // namespace v8 1402 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/platform/mutex.cc ('k') | src/compiler/gap-resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698