Chromium Code Reviews| Index: runtime/vm/class_table.cc |
| diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc |
| index 3b344909d61800df10b8c287bf40293e70de1492..5f18fef743ac0151dd1b7310b7937f31ad6f2a45 100644 |
| --- a/runtime/vm/class_table.cc |
| +++ b/runtime/vm/class_table.cc |
| @@ -5,6 +5,7 @@ |
| #include "vm/class_table.h" |
| #include "vm/flags.h" |
| #include "vm/freelist.h" |
| +#include "vm/heap_trace.h" |
| #include "vm/object.h" |
| #include "vm/raw_object.h" |
| #include "vm/visitor.h" |
| @@ -49,6 +50,9 @@ void ClassTable::Register(const Class& cls) { |
| ASSERT(table_[index] == 0); |
| ASSERT(index < capacity_); |
| table_[index] = cls.raw(); |
| + if (HeapTrace::is_enabled()) { |
| + Isolate::Current()->heap()->trace()->TraceRegisterClass(cls.raw()); |
|
siva
2012/12/05 16:06:40
Passing in a raw pointer to a function like this i
cshapiro
2012/12/08 03:23:08
Fixed.
|
| + } |
| // Add the vtable for this predefined class into the static vtable registry |
| // if it has not been setup yet. |
| cpp_vtable cls_vtable = cls.handle_vtable(); |
| @@ -72,6 +76,9 @@ void ClassTable::Register(const Class& cls) { |
| ASSERT(top_ < capacity_); |
| cls.set_id(top_); |
| table_[top_] = cls.raw(); |
| + if (HeapTrace::is_enabled()) { |
| + Isolate::Current()->heap()->trace()->TraceRegisterClass(cls.raw()); |
|
siva
2012/12/05 16:06:40
Ditto.
cshapiro
2012/12/08 03:23:08
Fixed.
|
| + } |
| top_++; // Increment next index. |
| } |
| } |