Commit e9738e76 authored by mkwst@chromium.org's avatar mkwst@chromium.org

clang/blink_gc_plugin: Replace 'WebCore' with 'blink'

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/401613002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283795 0039d316-1c4b-4281-b951-d872f2087c98
parent 8e78a4db
......@@ -574,9 +574,9 @@ class BlinkGCPluginConsumer : public ASTConsumer {
options_(options),
json_(0) {
// Only check structures in the blink, WebCore and WebKit namespaces.
// Only check structures in the blink, blink and WebKit namespaces.
options_.checked_namespaces.insert("blink");
options_.checked_namespaces.insert("blink");
options_.checked_namespaces.insert("WebCore");
options_.checked_namespaces.insert("WebKit");
// Ignore GC implementation files.
......
......@@ -92,11 +92,11 @@ class Config {
}
// Following http://crrev.com/369633033 (Blink r177436),
// ignore WebCore::ScriptWrappable's destructor.
// ignore blink::ScriptWrappable's destructor.
// FIXME: remove when its non-Oilpan destructor is removed.
static bool HasIgnorableDestructor(const std::string& ns,
const std::string& name) {
return ns == "WebCore" && name == "ScriptWrappable";
return ns == "blink" && name == "ScriptWrappable";
}
// Assumes name is a valid collection name.
......
......@@ -524,7 +524,7 @@ Edge* RecordInfo::CreateEdge(const Type* type) {
// TODO: Consider using a more canonical identification than names.
NamespaceDecl* ns =
dyn_cast<NamespaceDecl>(info->record()->getDeclContext());
if (!ns || ns->getName() != "WebCore")
if (!ns || ns->getName() != "blink")
return 0;
if (!info->GetTemplateArgs(1, &args))
return 0;
......
......@@ -257,7 +257,7 @@ def detect_cycles():
reset_graph()
# Mark ignored classes as already visited
for ignore in args.ignore_classes:
name = ignore.find("::") > 0 and ignore or ("WebCore::" + ignore)
name = ignore.find("::") > 0 and ignore or ("blink::" + ignore)
node = graph.get(name)
if node:
node.visited = True
......@@ -344,22 +344,22 @@ def read_ignored_cycles():
ignored_cycles.append(block)
gc_bases = (
'WebCore::GarbageCollected',
'WebCore::GarbageCollectedFinalized',
'WebCore::GarbageCollectedMixin',
'blink::GarbageCollected',
'blink::GarbageCollectedFinalized',
'blink::GarbageCollectedMixin',
)
ref_bases = (
'WTF::RefCounted',
'WTF::ThreadSafeRefCounted',
)
gcref_bases = (
'WebCore::RefCountedGarbageCollected',
'WebCore::ThreadSafeRefCountedGarbageCollected',
'blink::RefCountedGarbageCollected',
'blink::ThreadSafeRefCountedGarbageCollected',
)
ref_mixins = (
'WebCore::EventTarget',
'WebCore::EventTargetWithInlineData',
'WebCore::ActiveDOMObject',
'blink::EventTarget',
'blink::EventTargetWithInlineData',
'blink::ActiveDOMObject',
)
def print_stats():
......@@ -400,7 +400,7 @@ def print_stats():
"%s %3d%% of %-30s: %3d cls, %3d mem, %3d ref, %3d raw, %3d ref-mixins" %
(stats['ref'] == 0 and stats['ref-mixins'] == 0 and "*" or " ",
total == 0 and 100 or stats['mem'] * 100 / total,
node.name.replace('WebCore::', ''),
node.name.replace('blink::', ''),
stats['classes'],
stats['mem'],
stats['ref'],
......
......@@ -4,7 +4,7 @@
#include "base_requires_tracing.h"
namespace WebCore {
namespace blink {
void A::trace(Visitor* visitor) { }
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A : public GarbageCollected<A> {
public:
......
......@@ -4,7 +4,7 @@
#include "class_multiple_trace_bases.h"
namespace WebCore {
namespace blink {
void Base::trace(Visitor* visitor) { }
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class Base : public GarbageCollected<Base> {
public:
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject : public GarbageCollected<HeapObject> {
WTF_MAKE_FAST_ALLOCATED;
......
......@@ -4,7 +4,7 @@
#include "class_requires_finalization_base.h"
namespace WebCore {
namespace blink {
void NeedsFinalizer::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A : public GarbageCollected<A> {
public:
......
......@@ -4,7 +4,7 @@
#include "class_requires_finalization_field.h"
namespace WebCore {
namespace blink {
void NeedsFinalizer::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A : public GarbageCollected<A> {
public:
......@@ -27,18 +27,18 @@ public:
void trace(Visitor*) { };
};
} // WebCore namespace
} // blink namespace
namespace WTF {
template<>
struct VectorTraits<WebCore::C> {
struct VectorTraits<blink::C> {
static const bool needsDestruction = false;
};
} // WTF namespace
namespace WebCore {
namespace blink {
// Off-heap vectors always need to be finalized.
class NeedsFinalizer : public A, public ScriptWrappable {
......
......@@ -4,7 +4,7 @@
#include "class_requires_finalization_mixin.h"
namespace WebCore {
namespace blink {
void MixinFinalizable::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class OffHeap : public RefCounted<OffHeap> { };
class OnHeap : public GarbageCollected<OnHeap> { };
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject;
......
......@@ -4,7 +4,7 @@
#include "class_requires_trace_method_tmpl.h"
namespace WebCore {
namespace blink {
// Does not need a trace method.
class NoTrace : public TemplatedObject<PartObjectA> { };
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject : public GarbageCollected<HeapObject> { };
......
In file included from class_requires_trace_method_tmpl.cpp:5:
./class_requires_trace_method_tmpl.h:27:1: warning: [blink-gc] Class 'TemplatedObject<WebCore::PartObjectB>' requires a trace method.
./class_requires_trace_method_tmpl.h:27:1: warning: [blink-gc] Class 'TemplatedObject<blink::PartObjectB>' requires a trace method.
class TemplatedObject {
^
./class_requires_trace_method_tmpl.h:29:5: note: [blink-gc] Untraced field 'm_part' declared here:
......
......@@ -4,7 +4,7 @@
#include "cycle_ptrs.h"
namespace WebCore {
namespace blink {
void A::trace(Visitor* visitor) {
visitor->trace(m_b);
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class B;
class C;
......
Found a potentially leaking cycle starting from a GC root:
./cycle_ptrs.h:49:5: WebCore::E (m_a) => WebCore::A
./cycle_ptrs.h:26:5: WebCore::A (m_b) => WebCore::B
./cycle_ptrs.h:34:5: WebCore::B (m_c) => WebCore::C
./cycle_ptrs.h:39:5: WebCore::C (m_d) => WebCore::D
./cycle_ptrs.h:44:5: WebCore::D (m_es) => WebCore::E
./cycle_ptrs.h:49:5: blink::E (m_a) => blink::A
./cycle_ptrs.h:26:5: blink::A (m_b) => blink::B
./cycle_ptrs.h:34:5: blink::B (m_c) => blink::C
./cycle_ptrs.h:39:5: blink::C (m_d) => blink::D
./cycle_ptrs.h:44:5: blink::D (m_es) => blink::E
......@@ -4,7 +4,7 @@
#include "cycle_sub.h"
namespace WebCore {
namespace blink {
void B::trace(Visitor* visitor) {
visitor->trace(m_c);
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class C;
......
Found a potentially leaking cycle starting from a GC root:
./cycle_sub.h:31:5: WebCore::C (m_a) => WebCore::A
./cycle_sub.h:22:11: WebCore::A (<subclass>) => WebCore::B
./cycle_sub.h:26:5: WebCore::B (m_c) => WebCore::C
./cycle_sub.h:31:5: blink::C (m_a) => blink::A
./cycle_sub.h:22:11: blink::A (<subclass>) => blink::B
./cycle_sub.h:26:5: blink::B (m_c) => blink::C
......@@ -4,7 +4,7 @@
#include "cycle_super.h"
namespace WebCore {
namespace blink {
void A::trace(Visitor* visitor) {
visitor->trace(m_d);
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class D;
......
Found a potentially leaking cycle starting from a GC root:
./cycle_super.h:36:5: WebCore::D (m_c) => WebCore::C
./cycle_super.h:21:5: WebCore::C (WebCore::B <: WebCore::A <: m_d) => WebCore::D
./cycle_super.h:36:5: blink::D (m_c) => blink::C
./cycle_super.h:21:5: blink::C (blink::B <: blink::A <: m_d) => blink::D
......@@ -4,7 +4,7 @@
#include "cycle_super_neg.h"
namespace WebCore {
namespace blink {
void B::trace(Visitor* visitor) {
A::trace(visitor);
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class C;
......
......@@ -4,7 +4,7 @@
#include "destructor_access_finalized_field.h"
namespace WebCore {
namespace blink {
HeapObject::~HeapObject()
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class Other : public RefCounted<Other> {
public:
......
......@@ -4,7 +4,7 @@
#include "destructor_in_nonfinalized_class.h"
namespace WebCore {
namespace blink {
HeapObject::~HeapObject()
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject : public GarbageCollected<HeapObject> {
public:
......
......@@ -4,7 +4,7 @@
#include "fields_require_tracing.h"
namespace WebCore {
namespace blink {
void PartObject::trace(Visitor* visitor) {
// Missing visitor->trace(m_obj1);
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject;
......
......@@ -4,7 +4,7 @@
#include "finalize_after_dispatch.h"
namespace WebCore {
namespace blink {
static B* toB(A* a) { return static_cast<B*>(a); }
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class NeedsFinalize : public GarbageCollectedFinalized<NeedsFinalize> {
public:
......
......@@ -4,7 +4,7 @@
#include "garbage_collected_mixin.h"
namespace WebCore {
namespace blink {
void Mixin::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class Mixin : public GarbageCollectedMixin {
public:
......
......@@ -118,7 +118,7 @@ class HashMap {};
}
namespace WebCore {
namespace blink {
using namespace WTF;
......@@ -218,7 +218,7 @@ class GarbageCollectedMixin {
virtual bool isAlive(Visitor*) const = 0;
};
// WebCore::ScriptWrappable receives special treatment
// blink::ScriptWrappable receives special treatment
// so as to allow it to be used together with GarbageCollected<T>,
// even when its user-declared destructor is provided.
// As it is with Oilpan disabled.
......@@ -232,7 +232,7 @@ public:
namespace WTF {
template<typename T>
struct VectorTraits<WebCore::Member<T> > {
struct VectorTraits<blink::Member<T> > {
static const bool needsDestruction = false;
};
......
......@@ -4,7 +4,7 @@
#include "ignore_class.h"
namespace WebCore {
namespace blink {
void B::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject : public GarbageCollected<HeapObject> { };
......
......@@ -4,7 +4,7 @@
#include "ignore_fields.h"
namespace WebCore {
namespace blink {
void C::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject : public GarbageCollected<HeapObject> {
public:
......
......@@ -4,7 +4,7 @@
#include "inner_class.h"
namespace WebCore {
namespace blink {
void SomeObject::InnerObject::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class SomeObject {
private:
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A { };
class B { };
......
......@@ -4,7 +4,7 @@
#include "member_in_offheap_class.h"
namespace WebCore {
namespace blink {
void OffHeapObject::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject : public GarbageCollected<HeapObject> { };
......
......@@ -4,7 +4,7 @@
#include "non_virtual_trace.h"
namespace WebCore {
namespace blink {
void A::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A : public GarbageCollected<A> {
public:
......
......@@ -4,7 +4,7 @@
#include "own_ptr_to_gc_managed_class.h"
namespace WebCore {
namespace blink {
void HeapObject::trace(Visitor* visitor) { }
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject;
......
......@@ -4,7 +4,7 @@
#include "part_object_to_gc_derived_class.h"
namespace WebCore {
namespace blink {
void B::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A : public GarbageCollected<A> { };
......
......@@ -4,7 +4,7 @@
#include "persistent_field_in_gc_managed_class.h"
namespace WebCore {
namespace blink {
void HeapObject::trace(Visitor* visitor) {
visitor->trace(m_parts);
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject;
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A : public GarbageCollected<A> {
public:
......
......@@ -4,7 +4,7 @@
#include "raw_ptr_to_gc_managed_class.h"
namespace WebCore {
namespace blink {
void HeapObject::trace(Visitor* visitor) {
visitor->trace(m_objs);
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject;
......
......@@ -4,7 +4,7 @@
#include "ref_ptr_to_gc_managed_class.h"
namespace WebCore {
namespace blink {
void HeapObject::trace(Visitor*) { }
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject;
......
......@@ -4,7 +4,7 @@
#include "stack_allocated.h"
namespace WebCore {
namespace blink {
void HeapObject::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject;
......
......@@ -4,7 +4,7 @@
#include "trace_after_dispatch.h"
namespace WebCore {
namespace blink {
static B* toB(A* a) { return static_cast<B*>(a); }
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A : public GarbageCollected<A> {
public:
......
......@@ -4,7 +4,7 @@
#include "trace_collections.h"
namespace WebCore {
namespace blink {
void HeapObject::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject : public GarbageCollected<HeapObject> {
public:
......
......@@ -4,7 +4,7 @@
#include "virtual_and_trace_after_dispatch.h"
namespace WebCore {
namespace blink {
static B* toB(A* a) { return static_cast<B*>(a); }
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class A : public GarbageCollected<A> {
public:
......
......@@ -4,7 +4,7 @@
#include "weak_fields_require_tracing.h"
namespace WebCore {
namespace blink {
void HeapObject::trace(Visitor* visitor)
{
......
......@@ -7,7 +7,7 @@
#include "heap/stubs.h"
namespace WebCore {
namespace blink {
class HeapObject : public GarbageCollected<HeapObject> {
public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment