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

Unified Diff: src/mips64/full-codegen-mips64.cc

Issue 1150293002: Do not leak message object beyond try-catch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix memory leak by setting flag Created 5 years, 7 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 | « src/mips/full-codegen-mips.cc ('k') | src/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/full-codegen-mips64.cc
diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc
index b253ed8b3954b4fada10f38633bf48480e12e41b..65c4689fa868ecd6816f2ed608382cff1dda60c3 100644
--- a/src/mips64/full-codegen-mips64.cc
+++ b/src/mips64/full-codegen-mips64.cc
@@ -5356,6 +5356,8 @@ void FullCodeGenerator::EnterFinallyBlock() {
__ li(at, Operand(pending_message_obj));
__ ld(a1, MemOperand(at));
__ push(a1);
+
+ ClearPendingMessage();
}
@@ -5380,6 +5382,16 @@ void FullCodeGenerator::ExitFinallyBlock() {
}
+void FullCodeGenerator::ClearPendingMessage() {
+ DCHECK(!result_register().is(a1));
+ ExternalReference pending_message_obj =
+ ExternalReference::address_of_pending_message_obj(isolate());
+ __ LoadRoot(a1, Heap::kTheHoleValueRootIndex);
+ __ li(at, Operand(pending_message_obj));
+ __ sd(a1, MemOperand(at));
+}
+
+
#undef __
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698