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

Unified Diff: runtime/vm/source_report.cc

Issue 1971543002: Fix Observatory crash for DBC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/source_report.cc
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index ac162492f96c2759da5fca81917fbf09ed17224c..66ae9bd5061e187ee77dcd2ce0ef1d3feff11f1a 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -145,6 +145,14 @@ void SourceReport::PrintCallSitesData(JSONObject* jsobj,
RawPcDescriptors::kIcCall | RawPcDescriptors::kUnoptStaticCall);
while (iter.MoveNext()) {
HANDLESCOPE(thread());
+ // TODO(zra): Remove this bailout once DBC has reliable ICData.
+#if defined(TARGET_ARCH_DBC)
+ if (iter.DeoptId() >= ic_data_array->length()) {
+ continue;
+ }
+#else
+ ASSERT(iter.DeoptId() < ic_data_array->length());
+#endif
const ICData* ic_data = (*ic_data_array)[iter.DeoptId()];
if (ic_data != NULL) {
const TokenPosition token_pos = iter.TokenPos();
@@ -158,6 +166,7 @@ void SourceReport::PrintCallSitesData(JSONObject* jsobj,
}
}
+
void SourceReport::PrintCoverageData(JSONObject* jsobj,
const Function& function,
const Code& code) {
@@ -186,6 +195,14 @@ void SourceReport::PrintCoverageData(JSONObject* jsobj,
RawPcDescriptors::kIcCall | RawPcDescriptors::kUnoptStaticCall);
while (iter.MoveNext()) {
HANDLESCOPE(thread());
+ // TODO(zra): Remove this bailout once DBC has reliable ICData.
+#if defined(TARGET_ARCH_DBC)
+ if (iter.DeoptId() >= ic_data_array->length()) {
+ continue;
+ }
+#else
+ ASSERT(iter.DeoptId() < ic_data_array->length());
+#endif
const ICData* ic_data = (*ic_data_array)[iter.DeoptId()];
if (ic_data != NULL) {
const TokenPosition token_pos = iter.TokenPos();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698