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

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

Issue 9597012: Simplify silent abort by raising SIGABRT directly. (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 | « no previous file | src/win32-headers.h » ('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 // 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 } 960 }
961 961
962 962
963 void OS::Sleep(int milliseconds) { 963 void OS::Sleep(int milliseconds) {
964 ::Sleep(milliseconds); 964 ::Sleep(milliseconds);
965 } 965 }
966 966
967 967
968 void OS::Abort() { 968 void OS::Abort() {
969 if (!IsDebuggerPresent()) { 969 if (!IsDebuggerPresent()) {
970 #ifdef _MSC_VER
971 // Make the MSVCRT do a silent abort. 970 // Make the MSVCRT do a silent abort.
972 _set_abort_behavior(0, _WRITE_ABORT_MSG); 971 raise(SIGABRT);
973 _set_abort_behavior(0, _CALL_REPORTFAULT);
974 #endif // _MSC_VER
975 abort();
976 } else { 972 } else {
977 DebugBreak(); 973 DebugBreak();
978 } 974 }
979 } 975 }
980 976
981 977
982 void OS::DebugBreak() { 978 void OS::DebugBreak() {
983 #ifdef _MSC_VER 979 #ifdef _MSC_VER
984 __debugbreak(); 980 __debugbreak();
985 #else 981 #else
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 2094
2099 2095
2100 void Sampler::Stop() { 2096 void Sampler::Stop() {
2101 ASSERT(IsActive()); 2097 ASSERT(IsActive());
2102 SamplerThread::RemoveActiveSampler(this); 2098 SamplerThread::RemoveActiveSampler(this);
2103 SetActive(false); 2099 SetActive(false);
2104 } 2100 }
2105 2101
2106 2102
2107 } } // namespace v8::internal 2103 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/win32-headers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698