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

Unified Diff: src/isolate.cc

Issue 1122083002: Remove materialized objects on stack unwind. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/isolate.h ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index f3596483112c00f8dbc2081c1a24bab75fae6c4e..14072e4686862f9b747ff760cf3d46cb94663cd0 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1043,6 +1043,8 @@ Object* Isolate::FindHandler() {
for (StackFrameIterator iter(this); !iter.done(); iter.Advance()) {
StackFrame* frame = iter.frame();
+ RemoveMaterializedObjectsOnUnwind(frame);
Michael Starzinger 2015/05/04 15:17:03 As discussed offline: I think the materialized obj
+
// For JSEntryStub frames we always have a handler.
if (frame->is_entry() || frame->is_entry_construct()) {
StackHandler* handler = frame->top_handler();
@@ -1117,6 +1119,17 @@ Object* Isolate::FindHandler() {
}
+void Isolate::RemoveMaterializedObjectsOnUnwind(StackFrame* frame) {
+ if (frame->is_optimized()) {
+ bool removed = materialized_object_store_->Remove(frame->fp());
+ USE(removed);
+ // If there were any materialized objects, the code should be
+ // marked for deopt.
+ DCHECK(!removed || frame->LookupCode()->marked_for_deoptimization());
+ }
+}
+
+
Isolate::CatchType Isolate::PredictExceptionCatcher() {
Address external_handler = thread_local_top()->try_catch_handler_address();
Address entry_handler = Isolate::handler(thread_local_top());
« no previous file with comments | « src/isolate.h ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698