Home | History | Annotate | Download | only in blink_gc_plugin
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "Config.h"
      6 #include "Edge.h"
      7 #include "RecordInfo.h"
      8 
      9 TracingStatus Value::NeedsTracing(NeedsTracingOption option) {
     10   return value_->NeedsTracing(option);
     11 }
     12 
     13 bool Value::NeedsFinalization() { return value_->NeedsFinalization(); }
     14 bool Collection::NeedsFinalization() { return info_->NeedsFinalization(); }
     15 
     16 void RecursiveEdgeVisitor::AtValue(Value*) {}
     17 void RecursiveEdgeVisitor::AtRawPtr(RawPtr*) {}
     18 void RecursiveEdgeVisitor::AtRefPtr(RefPtr*) {}
     19 void RecursiveEdgeVisitor::AtOwnPtr(OwnPtr*) {}
     20 void RecursiveEdgeVisitor::AtUniquePtr(UniquePtr*) {}
     21 void RecursiveEdgeVisitor::AtMember(Member*) {}
     22 void RecursiveEdgeVisitor::AtWeakMember(WeakMember*) {}
     23 void RecursiveEdgeVisitor::AtPersistent(Persistent*) {}
     24 void RecursiveEdgeVisitor::AtCrossThreadPersistent(CrossThreadPersistent*) {}
     25 void RecursiveEdgeVisitor::AtCollection(Collection*) {}
     26 
     27 void RecursiveEdgeVisitor::VisitValue(Value* e) {
     28   AtValue(e);
     29 }
     30 
     31 void RecursiveEdgeVisitor::VisitRawPtr(RawPtr* e) {
     32   AtRawPtr(e);
     33   Enter(e);
     34   e->ptr()->Accept(this);
     35   Leave();
     36 }
     37 
     38 void RecursiveEdgeVisitor::VisitRefPtr(RefPtr* e) {
     39   AtRefPtr(e);
     40   Enter(e);
     41   e->ptr()->Accept(this);
     42   Leave();
     43 }
     44 void RecursiveEdgeVisitor::VisitOwnPtr(OwnPtr* e) {
     45   AtOwnPtr(e);
     46   Enter(e);
     47   e->ptr()->Accept(this);
     48   Leave();
     49 }
     50 
     51 void RecursiveEdgeVisitor::VisitUniquePtr(UniquePtr* e) {
     52   AtUniquePtr(e);
     53   Enter(e);
     54   e->ptr()->Accept(this);
     55   Leave();
     56 }
     57 
     58 void RecursiveEdgeVisitor::VisitMember(Member* e) {
     59   AtMember(e);
     60   Enter(e);
     61   e->ptr()->Accept(this);
     62   Leave();
     63 }
     64 
     65 void RecursiveEdgeVisitor::VisitWeakMember(WeakMember* e) {
     66   AtWeakMember(e);
     67   Enter(e);
     68   e->ptr()->Accept(this);
     69   Leave();
     70 }
     71 
     72 void RecursiveEdgeVisitor::VisitPersistent(Persistent* e) {
     73   AtPersistent(e);
     74   Enter(e);
     75   e->ptr()->Accept(this);
     76   Leave();
     77 }
     78 
     79 void RecursiveEdgeVisitor::VisitCrossThreadPersistent(
     80     CrossThreadPersistent* e) {
     81   AtCrossThreadPersistent(e);
     82   Enter(e);
     83   e->ptr()->Accept(this);
     84   Leave();
     85 }
     86 
     87 void RecursiveEdgeVisitor::VisitCollection(Collection* e) {
     88   AtCollection(e);
     89   Enter(e);
     90   e->AcceptMembers(this);
     91   Leave();
     92 }
     93