From 5b0c1c65343b0a12e989d34897ee20d1c4ab712a Mon Sep 17 00:00:00 2001 From: "Ben L. Titzer" Date: Fri, 18 Aug 2017 10:22:47 +0200 Subject: [PATCH] [frames] Unpack FrameSummary early in FrameInspector. This CL is a precursor to the callback-based enumeration of frame summaries. It removes the reliance of FrameInspector on having a cached copy of the FrameSummary, instead unpacking it to instance variables so that clients of FrameInspector do not need to get information from two sources (the FrameSummary and the FrameInspector itself). R=yangguo@chromium.org Bug: Change-Id: Ib388566c2e1a1147ee0a581323932982a29ae4ff Reviewed-on: https://chromium-review.googlesource.com/618334 Commit-Queue: Ben Titzer Reviewed-by: Yang Guo Cr-Commit-Position: refs/heads/master@{#47420} --- src/debug/debug-frames.cc | 43 ++++++++++++------------- src/debug/debug-frames.h | 30 ++++++++++------- src/debug/debug-stack-trace-iterator.cc | 26 ++++++++------- src/runtime/runtime-debug.cc | 8 ++--- 4 files changed, 58 insertions(+), 49 deletions(-) diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc index 39c5b3b329..d646dc9cf1 100644 --- a/src/debug/debug-frames.cc +++ b/src/debug/debug-frames.cc @@ -14,13 +14,24 @@ namespace internal { FrameInspector::FrameInspector(StandardFrame* frame, int inlined_frame_index, Isolate* isolate) : frame_(frame), - frame_summary_(FrameSummary::Get(frame, inlined_frame_index)), isolate_(isolate) { + // Extract the relevant information from the frame summary and discard it. + FrameSummary summary = FrameSummary::Get(frame, inlined_frame_index); + + is_constructor_ = summary.is_constructor(); + source_position_ = summary.SourcePosition(); + function_name_ = summary.FunctionName(); + script_ = Handle