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

Unified Diff: runtime/vm/exceptions.cc

Issue 246303004: Fixes bug where we would occasionally materialize a corrupted object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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/vm/exceptions.cc
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 303bebd77ab8a951f58ab1c3025afc07ad396487..8b7adfc3e8106e0c63b9786bbb469e5634e314eb 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -285,6 +285,7 @@ static void JumpToExceptionHandler(uword program_counter,
// exception object in the kExceptionObjectReg register and the stacktrace
// object (may be raw null) in the kStackTraceObjectReg register.
isolate->set_vm_tag(VMTag::kScriptTagId);
+ isolate->set_top_context(Context::null());
Simulator::Current()->Longjmp(program_counter, stack_pointer, frame_pointer,
raw_exception, raw_stacktrace);
#else
@@ -308,6 +309,7 @@ static void JumpToExceptionHandler(uword program_counter,
__asan_unpoison_memory_region(reinterpret_cast<void*>(current_sp),
stack_pointer - current_sp);
isolate->set_vm_tag(VMTag::kScriptTagId);
+ isolate->set_top_context(Context::null());
func(program_counter, stack_pointer, frame_pointer,
raw_exception, raw_stacktrace);
#endif

Powered by Google App Engine
This is Rietveld 408576698