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

Unified Diff: runtime/vm/source_report.h

Issue 2038203002: Fix various nefarious problems with the script table used in source reports. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « no previous file | runtime/vm/source_report.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/source_report.h
diff --git a/runtime/vm/source_report.h b/runtime/vm/source_report.h
index cd2ad3a2190b88f733894071a667486cbc485eba..dec18cfa7741356057626e5f661535e9a7f90d0d 100644
--- a/runtime/vm/source_report.h
+++ b/runtime/vm/source_report.h
@@ -40,6 +40,7 @@ class SourceReport {
// (e.g. kCallSites | kCoverage).
explicit SourceReport(intptr_t report_set,
CompileMode compile = kNoCompile);
+ ~SourceReport();
// Generate a source report for (some subrange of) a script.
//
@@ -50,6 +51,7 @@ class SourceReport {
TokenPosition end_pos = TokenPosition::kNoSource);
private:
+ void ClearScriptTable();
void Init(Thread* thread, const Script* script,
TokenPosition start_pos, TokenPosition end_pos);
@@ -69,6 +71,9 @@ class SourceReport {
void PrintPossibleBreakpointsData(JSONObject* jsobj,
const Function& func, const Code& code);
void PrintProfileData(JSONObject* jsobj, ProfileFunction* profile_function);
+#if defined(DEBUG)
+ void VerifyScriptTable();
+#endif
void PrintScriptTable(JSONArray* jsarr);
void VisitFunction(JSONArray* jsarr, const Function& func);
@@ -114,7 +119,7 @@ class SourceReport {
TokenPosition start_pos_;
TokenPosition end_pos_;
Profile profile_;
- GrowableArray<ScriptTableEntry> script_table_entries_;
+ GrowableArray<ScriptTableEntry*> script_table_entries_;
DirectChainedHashMap<ScriptTableTrait> script_table_;
intptr_t next_script_index_;
};
« no previous file with comments | « no previous file | runtime/vm/source_report.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698