| Index: runtime/vm/object.cc
|
| ===================================================================
|
| --- runtime/vm/object.cc (revision 45397)
|
| +++ runtime/vm/object.cc (working copy)
|
| @@ -12567,7 +12567,8 @@
|
| descriptors.PrintToJSONObject(&desc, false);
|
| }
|
| const Array& inlined_function_table = Array::Handle(inlined_id_to_function());
|
| - if (!inlined_function_table.IsNull()) {
|
| + if (!inlined_function_table.IsNull() &&
|
| + (inlined_function_table.Length() > 0)) {
|
| JSONArray inlined_functions(&jsobj, "_inlinedFunctions");
|
| Function& function = Function::Handle();
|
| for (intptr_t i = 0; i < inlined_function_table.Length(); i++) {
|
| @@ -12577,7 +12578,7 @@
|
| }
|
| }
|
| const Array& intervals = Array::Handle(inlined_intervals());
|
| - if (!intervals.IsNull()) {
|
| + if (!intervals.IsNull() && (intervals.Length() > 0)) {
|
| Smi& start = Smi::Handle();
|
| Smi& end = Smi::Handle();
|
| Smi& temp_smi = Smi::Handle();
|
| @@ -12657,6 +12658,7 @@
|
| intptr_t Code::GetCallerId(intptr_t inlined_id) const {
|
| if (inlined_id < 0) return -1;
|
| const Array& intervals = Array::Handle(inlined_intervals());
|
| + if (intervals.IsNull() || (intervals.Length() == 0)) return -1;
|
| Smi& temp_smi = Smi::Handle();
|
| for (intptr_t i = 0; i < intervals.Length() - Code::kInlIntNumEntries;
|
| i += Code::kInlIntNumEntries) {
|
| @@ -12674,7 +12676,7 @@
|
| intptr_t offset, GrowableArray<Function*>* fs) const {
|
| fs->Clear();
|
| const Array& intervals = Array::Handle(inlined_intervals());
|
| - if (intervals.IsNull()) {
|
| + if (intervals.IsNull() || (intervals.Length() == 0)) {
|
| // E.g., for code stubs.
|
| return;
|
| }
|
| @@ -12716,6 +12718,7 @@
|
| void Code::DumpInlinedIntervals() const {
|
| OS::Print("Inlined intervals:\n");
|
| const Array& intervals = Array::Handle(inlined_intervals());
|
| + if (intervals.IsNull() || (intervals.Length() == 0)) return;
|
| Smi& start = Smi::Handle();
|
| Smi& inlining_id = Smi::Handle();
|
| Smi& caller_id = Smi::Handle();
|
|
|