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

Unified Diff: src/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/full-codegen-arm64.cc
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc
index 632ec5f44ed7236216dc699f340cfebc67bcd97d..171765dd02f9c9f3b2657070c1fe7ae38c29c11a 100644
--- a/src/arm64/full-codegen-arm64.cc
+++ b/src/arm64/full-codegen-arm64.cc
@@ -5363,6 +5363,8 @@ void FullCodeGenerator::EnterFinallyBlock() {
__ Mov(x10, pending_message_obj);
__ Ldr(x10, MemOperand(x10));
__ Push(x10);
+
+ ClearPendingMessage();
}
@@ -5387,6 +5389,16 @@ void FullCodeGenerator::ExitFinallyBlock() {
}
+void FullCodeGenerator::ClearPendingMessage() {
+ DCHECK(!result_register().is(x10));
+ ExternalReference pending_message_obj =
+ ExternalReference::address_of_pending_message_obj(isolate());
+ __ LoadRoot(x10, Heap::kTheHoleValueRootIndex);
+ __ Mov(x13, pending_message_obj);
+ __ Str(x10, MemOperand(x13));
+}
+
+
#undef __
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698