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

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

Issue 9706097: Add flag to always call DebugBreak on abort (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/platform-linux.cc ('k') | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 VirtualProtect(address, size, PAGE_READONLY | PAGE_GUARD, &oldprotect); 954 VirtualProtect(address, size, PAGE_READONLY | PAGE_GUARD, &oldprotect);
955 } 955 }
956 956
957 957
958 void OS::Sleep(int milliseconds) { 958 void OS::Sleep(int milliseconds) {
959 ::Sleep(milliseconds); 959 ::Sleep(milliseconds);
960 } 960 }
961 961
962 962
963 void OS::Abort() { 963 void OS::Abort() {
964 if (!IsDebuggerPresent()) { 964 if (IsDebuggerPresent() || FLAG_break_on_abort) {
965 DebugBreak();
966 } else {
965 // Make the MSVCRT do a silent abort. 967 // Make the MSVCRT do a silent abort.
966 raise(SIGABRT); 968 raise(SIGABRT);
967 } else {
968 DebugBreak();
969 } 969 }
970 } 970 }
971 971
972 972
973 void OS::DebugBreak() { 973 void OS::DebugBreak() {
974 #ifdef _MSC_VER 974 #ifdef _MSC_VER
975 __debugbreak(); 975 __debugbreak();
976 #else 976 #else
977 ::DebugBreak(); 977 ::DebugBreak();
978 #endif 978 #endif
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 2089
2090 2090
2091 void Sampler::Stop() { 2091 void Sampler::Stop() {
2092 ASSERT(IsActive()); 2092 ASSERT(IsActive());
2093 SamplerThread::RemoveActiveSampler(this); 2093 SamplerThread::RemoveActiveSampler(this);
2094 SetActive(false); 2094 SetActive(false);
2095 } 2095 }
2096 2096
2097 2097
2098 } } // namespace v8::internal 2098 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698