| 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 {
|
|
|