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

Unified Diff: runtime/vm/exceptions.cc

Issue 2670713004: VM: Don't overwrite stacktrace when rethrowing StackOverflow. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index c2bc393426d38514d201ffa8c52c179585f8d19d..bc0bd111aee300701ac2704b7fdd3c3213c8f448 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -421,7 +421,10 @@ static void ThrowExceptionHelper(Thread* thread,
}
stacktrace ^= isolate->object_store()->preallocated_stack_trace();
PreallocatedStackTraceBuilder frame_builder(stacktrace);
- if (handler_needs_stacktrace) {
+ ASSERT(existing_stacktrace.IsNull() ||
+ (existing_stacktrace.raw() == stacktrace.raw()));
+ ASSERT(existing_stacktrace.IsNull() || is_rethrow);
+ if (handler_needs_stacktrace && existing_stacktrace.IsNull()) {
BuildStackTrace(&frame_builder);
}
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698