Chromium Code Reviews| Index: src/objects-printer.cc |
| diff --git a/src/objects-printer.cc b/src/objects-printer.cc |
| index eca9bab822836873e007e05f514802ff57c5cfe7..325ba13fb594a3abc1be770259ba6a60f0488924 100644 |
| --- a/src/objects-printer.cc |
| +++ b/src/objects-printer.cc |
| @@ -151,6 +151,9 @@ void HeapObject::HeapObjectPrint(FILE* out) { |
| PrintF(out, "Value wrapper around:"); |
| JSValue::cast(this)->value()->Print(out); |
| break; |
| + case JS_DATE_TYPE: |
| + JSDate::cast(this)->value()->Print(out); |
| + break; |
| case CODE_TYPE: |
| Code::cast(this)->CodePrint(out); |
| break; |
| @@ -641,6 +644,26 @@ char* String::ToAsciiArray() { |
| } |
| +void JSDate::JSDatePrint(FILE* out) { |
| + HeapObject::PrintHeader(out, "JSDate"); |
| + PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); |
| + PrintF(out, " - value = "); |
| + value()->Print(out); |
| + if (!year()->IsSmi()) { |
| + PrintF(out, " - time = NaN\n"); |
| + } else { |
| + PrintF(out, " - time = %04d/%02d/%02d %02d:%02d:%02d.%04d\n", |
|
ulan
2012/01/25 13:08:48
ms is a three digit number, so %04d should be %03d
rossberg
2012/01/25 15:48:37
Done.
|
| + Smi::cast(year())->value(), |
| + Smi::cast(month())->value(), |
| + Smi::cast(day())->value(), |
| + Smi::cast(hour())->value(), |
| + Smi::cast(min())->value(), |
| + Smi::cast(sec())->value(), |
| + Smi::cast(ms())->value()); |
| + } |
| +} |
| + |
| + |
| void JSProxy::JSProxyPrint(FILE* out) { |
| HeapObject::PrintHeader(out, "JSProxy"); |
| PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); |