| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 7573c676aa14201271684b66a5b7727a95349daf..ed90900877dd84c55dcc3107a5a07c8cecd0bd8d 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -1451,6 +1451,37 @@ class Heap {
|
| void TraceObjectStat(const char* name, int count, int size, double time);
|
| void CheckpointObjectStats();
|
|
|
| + struct StrongRootsList {
|
| + Object** start_;
|
| + Object** end_;
|
| + StrongRootsList* next_;
|
| + };
|
| +
|
| + void RegisterStrongRoots(Object** start, Object** end) {
|
| + StrongRootsList* list = new StrongRootsList();
|
| + list->next_ = strong_roots_list_;
|
| + list->start_ = start;
|
| + list->end_ = end;
|
| + strong_roots_list_ = list;
|
| + }
|
| +
|
| + void UnregisterStrongRoots(Object** start) {
|
| + StrongRootsList* prev = NULL;
|
| + for (StrongRootsList* list = strong_roots_list_; list; list = list->next_) {
|
| + if (list->start_ == start) {
|
| + if (prev) {
|
| + prev->next_ = list->next_;
|
| + } else {
|
| + strong_roots_list_ = list->next_;
|
| + }
|
| + delete list;
|
| + }
|
| + prev = list;
|
| + }
|
| + }
|
| +
|
| + base::Mutex* relocation_mutex() { return &relocation_mutex_; }
|
| +
|
| // We don't use a LockGuard here since we want to lock the heap
|
| // only when FLAG_concurrent_recompilation is true.
|
| class RelocationLock {
|
| @@ -2151,6 +2182,8 @@ class Heap {
|
|
|
| bool concurrent_sweeping_enabled_;
|
|
|
| + StrongRootsList* strong_roots_list_;
|
| +
|
| friend class AlwaysAllocateScope;
|
| friend class Deserializer;
|
| friend class Factory;
|
|
|