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

Unified Diff: runtime/lib/object.cc

Issue 953973003: - Add a _fatal helper function into dart:core, so that we can (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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
Index: runtime/lib/object.cc
===================================================================
--- runtime/lib/object.cc (revision 43993)
+++ runtime/lib/object.cc (working copy)
@@ -20,7 +20,20 @@
DECLARE_FLAG(bool, trace_type_checks);
DECLARE_FLAG(bool, warn_on_javascript_compatibility);
+// Helper function in stacktrace.cc.
+void _printCurrentStacktrace();
+DEFINE_NATIVE_ENTRY(DartCore_fatal, 1) {
+ // The core library code entered an unrecoverable state.
+ const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
+ const char* msg = instance.ToCString();
+ OS::PrintErr("Fatal error in dart:core\n");
+ _printCurrentStacktrace();
+ FATAL(msg);
+ return Object::null();
+}
+
+
DEFINE_NATIVE_ENTRY(Object_equals, 1) {
// Implemented in the flow graph builder.
UNREACHABLE();

Powered by Google App Engine
This is Rietveld 408576698