| Index: tools/clang/blink_gc_plugin/tests/static_singleton.h
|
| diff --git a/tools/clang/blink_gc_plugin/tests/static_singleton.h b/tools/clang/blink_gc_plugin/tests/static_singleton.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9534f29b65e80b944d9116fb76dc7c8d34f99a80
|
| --- /dev/null
|
| +++ b/tools/clang/blink_gc_plugin/tests/static_singleton.h
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2017 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 STATIC_SINGLETON_H_
|
| +#define STATIC_SINGLETON_H_
|
| +
|
| +#include "heap/stubs.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class AScriptWrappable : public GarbageCollected<AScriptWrappable>,
|
| + public ScriptWrappable {
|
| + void Trace(Visitor* visitor) { visitor->Trace(a_); }
|
| +
|
| + private:
|
| + Member<AScriptWrappable> a_;
|
| +};
|
| +
|
| +class BScriptWrappable : public GarbageCollected<AScriptWrappable> {
|
| + void Trace(Visitor* visitor) { visitor->Trace(a_); }
|
| +
|
| + private:
|
| + Member<AScriptWrappable> a_;
|
| +};
|
| +
|
| +class HeapObject : public GarbageCollected<HeapObject> {
|
| + public:
|
| + static HeapObject& instance();
|
| +
|
| + void Trace(Visitor* visitor) { visitor->Trace(b_); }
|
| +
|
| + private:
|
| + Member<BScriptWrappable> b_;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // STATIC_SINGLETON_H_
|
|
|