aboutsummaryrefslogtreecommitdiff
path: root/tools/clang/blink_gc_plugin/tests/raw_ptr_to_gc_managed_class_error.h
blob: 99e5b56b7bd1bda7657b7e48877e77aeafd7cf25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef RAW_PTR_TO_GC_MANAGED_CLASS_ERROR_H_
#define RAW_PTR_TO_GC_MANAGED_CLASS_ERROR_H_

#include "heap/stubs.h"

namespace blink {

class HeapObject;

class PartObject {
    DISALLOW_NEW();
private:
    PartObject();

    HeapObject* m_rawObj;
    HeapObject& m_refObj;
};

class HeapObject : public GarbageCollected<HeapObject> {
public:
    void Trace(Visitor*);
private:
    PartObject m_part;
    HeapVector<HeapObject*> m_objs;
};

}

#endif