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

Unified Diff: runtime/platform/assert.cc

Issue 2199453002: Attempt to print the stack using the profiler upon assertion failure. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/assert.cc
diff --git a/runtime/platform/assert.cc b/runtime/platform/assert.cc
index ff71e3f78c8cefb827bfb0419fee4cb8fe02d668..921a56461b8187e762a4db8ec88b5ee2655dc7aa 100644
--- a/runtime/platform/assert.cc
+++ b/runtime/platform/assert.cc
@@ -6,6 +6,7 @@
#include "platform/globals.h"
#include "vm/os.h"
+#include "vm/profiler.h"
namespace dart {
@@ -40,9 +41,8 @@ void DynamicAssertionHelper::Fail(const char* format, ...) {
// In case of failed assertions, abort right away. Otherwise, wait
// until the program is exiting before producing a non-zero exit
// code through abort.
- // TODO(5411324): replace std::abort with OS::Abort so that we can handle
- // restoring of signal handlers before aborting.
if (kind_ == ASSERT) {
+ NOT_IN_PRODUCT(Profiler::DumpStackTrace(true /* native_stack_trace */));
OS::Abort();
}
static bool failed = false;
« no previous file with comments | « no previous file | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698