Commit 76850146 authored by mvstanton's avatar mvstanton Committed by Commit bot

PrintFixedArrayElements should avoid peeking into empty arrays.

Small bugfix.

BUG=

Review-Url: https://codereview.chromium.org/2656903003
Cr-Commit-Position: refs/heads/master@{#42690}
parent 2db0e8cb
......@@ -417,7 +417,7 @@ void DoPrintElements(std::ostream& os, Object* object) { // NOLINT
void PrintFixedArrayElements(std::ostream& os, FixedArray* array) {
// Print in array notation for non-sparse arrays.
Object* previous_value = array->get(0);
Object* previous_value = array->length() > 0 ? array->get(0) : nullptr;
Object* value = nullptr;
int previous_index = 0;
int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment