Commit 35fa419a authored by cbruni's avatar cbruni Committed by Commit bot

[printing] Add COW identifier to elements kind

BUG=

Review URL: https://codereview.chromium.org/1842743002

Cr-Commit-Position: refs/heads/master@{#35157}
parent 08e0ea38
......@@ -396,10 +396,16 @@ static void JSObjectPrintHeader(std::ostream& os, JSObject* obj,
obj->PrintHeader(os, id);
// Don't call GetElementsKind, its validation code can cause the printer to
// fail when debugging.
PrototypeIterator iter(obj->GetIsolate(), obj);
os << "\n - map = " << reinterpret_cast<void*>(obj->map()) << " ["
<< ElementsKindToString(obj->map()->elements_kind())
<< "]\n - prototype = " << reinterpret_cast<void*>(iter.GetCurrent());
<< ElementsKindToString(obj->map()->elements_kind());
if (obj->elements()->map() == obj->GetHeap()->fixed_cow_array_map()) {
os << " (COW)";
}
PrototypeIterator iter(obj->GetIsolate(), obj);
os << "]\n - prototype = " << reinterpret_cast<void*>(iter.GetCurrent());
if (obj->elements()->length() > 0) {
os << "\n - elements = " << Brief(obj->elements());
}
}
......
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