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

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

Issue 10537078: Preserve error message during finally block in try..finally. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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/isolate.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 0db7424eb26e79887434efc03101d875cbc7a16c..fb86f2e8de076e89a4a2b020f021b78525fdbbc2 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -4477,6 +4477,26 @@ void FullCodeGenerator::ExitFinallyBlock() {
}
+void FullCodeGenerator::SavePendingMessage() {
+ ASSERT(!result_register().is(rdx));
+ // Store pending message while executing finally block upon exception.
+ ExternalReference pending_message_obj =
+ ExternalReference::address_of_pending_message_obj(isolate());
+ __ Load(rdx, pending_message_obj);
+ __ push(rdx);
+}
+
+
+void FullCodeGenerator::RestorePendingMessage() {
+ ASSERT(!result_register().is(rdx));
+ // Restore pending message if cleared by executing the finally block.
+ __ pop(rdx);
+ ExternalReference pending_message_obj =
+ ExternalReference::address_of_pending_message_obj(isolate());
+ __ Store(pending_message_obj, rdx);
+}
+
+
#undef __
#define __ ACCESS_MASM(masm())
« no previous file with comments | « src/isolate.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698