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

Unified Diff: src/isolate.cc

Issue 1103843002: Preprocess structured stack trace on GC to get rid of code reference. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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/heap/heap.cc ('k') | src/messages.js » ('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 b526a01535e23f03ac123b1fdf13de6ff3a79edf..b6c545eb39238754309d17110a5a8d725b839e00 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -407,8 +407,13 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSObject> error_object,
}
}
elements->set(0, Smi::FromInt(sloppy_frames));
+ elements->Shrink(cursor);
Handle<JSArray> result = factory()->NewJSArrayWithElements(elements);
result->set_length(Smi::FromInt(cursor));
+ // Queue this structured stack trace for preprocessing on GC.
+ Handle<WeakFixedArray> new_weak_list =
+ WeakFixedArray::Add(factory()->weak_stack_trace_list(), elements);
+ factory()->set_weak_stack_trace_list(new_weak_list);
return result;
}
« no previous file with comments | « src/heap/heap.cc ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698