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

Unified Diff: runtime/lib/errors.cc

Issue 1383983002: Make root-zone handleUncaughtError rethrow with the correct stack. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/errors.cc
diff --git a/runtime/lib/errors.cc b/runtime/lib/errors.cc
index 8383a307634ed1be18f7ce59591253d79ff75652..31c3a85cbbd3f9b58cca34a2f944313832ab7d41 100644
--- a/runtime/lib/errors.cc
+++ b/runtime/lib/errors.cc
@@ -126,4 +126,12 @@ DEFINE_NATIVE_ENTRY(AbstractClassInstantiationError_throwNew, 2) {
return Object::null();
}
+// Rethrow an error with a stacktrace.
+DEFINE_NATIVE_ENTRY(Zone_rethrow, 2) {
+ GET_NON_NULL_NATIVE_ARGUMENT(Instance, error, arguments->NativeArgAt(0));
+ GET_NON_NULL_NATIVE_ARGUMENT(Instance, stacktrace, arguments->NativeArgAt(1));
+ Exceptions::ReThrow(thread, error, stacktrace);
+ return Object::null();
+}
+
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698