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 |