Index: Source/core/inspector/CodeGeneratorInstrumentation.py |
diff --git a/Source/core/inspector/CodeGeneratorInstrumentation.py b/Source/core/inspector/CodeGeneratorInstrumentation.py |
index c31371766163373f9e931040a4b25fb3a24b68cd..2d4ada8732fead8dde9915653a5624035ac553ad 100755 |
--- a/Source/core/inspector/CodeGeneratorInstrumentation.py |
+++ b/Source/core/inspector/CodeGeneratorInstrumentation.py |
@@ -115,6 +115,7 @@ template_instrumenting_agents_h = string.Template("""// Code generated from Insp |
#ifndef InstrumentingAgentsInl_h |
#define InstrumentingAgentsInl_h |
+#include "platform/heap/Handle.h" |
#include "wtf/FastAllocBase.h" |
#include "wtf/Noncopyable.h" |
#include "wtf/PassRefPtr.h" |
@@ -124,15 +125,16 @@ namespace WebCore { |
${forward_list} |
-class InstrumentingAgents : public RefCounted<InstrumentingAgents> { |
+class InstrumentingAgents : public RefCountedWillBeGarbageCollectedFinalized<InstrumentingAgents> { |
WTF_MAKE_NONCOPYABLE(InstrumentingAgents); |
- WTF_MAKE_FAST_ALLOCATED; |
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
public: |
- static PassRefPtr<InstrumentingAgents> create() |
+ static PassRefPtrWillBeRawPtr<InstrumentingAgents> create() |
{ |
- return adoptRef(new InstrumentingAgents()); |
+ return adoptRefWillBeNoop(new InstrumentingAgents()); |
} |
~InstrumentingAgents() { } |
+ void trace(Visitor*); |
void reset(); |
${accessor_list} |
@@ -158,6 +160,11 @@ InstrumentingAgents::InstrumentingAgents() |
{ |
} |
+void InstrumentingAgents::trace(Visitor* visitor) |
+{ |
+ $trace_list |
+} |
+ |
void InstrumentingAgents::reset() |
{ |
$reset_list |
@@ -440,6 +447,7 @@ def generate_instrumenting_agents(used_agents): |
accessor_list = [] |
member_list = [] |
init_list = [] |
+ trace_list = [] |
reset_list = [] |
for agent in agents: |
@@ -452,14 +460,16 @@ def generate_instrumenting_agents(used_agents): |
class_name=class_name, |
getter_name=getter_name, |
member_name=member_name)) |
- member_list.append(" %s* %s;" % (class_name, member_name)) |
- init_list.append("%s(0)" % member_name) |
- reset_list.append("%s = 0;" % member_name) |
+ member_list.append(" RawPtrWillBeMember<%s> %s;" % (class_name, member_name)) |
+ init_list.append("%s(nullptr)" % member_name) |
+ trace_list.append("visitor->trace(%s);" % member_name) |
+ reset_list.append("%s = nullptr;" % member_name) |
forward_list.sort() |
accessor_list.sort() |
member_list.sort() |
init_list.sort() |
+ trace_list.sort() |
reset_list.sort() |
header_lines = template_instrumenting_agents_h.substitute( |
@@ -471,6 +481,7 @@ def generate_instrumenting_agents(used_agents): |
cpp_lines = template_instrumenting_agents_cpp.substitute( |
None, |
init_list="\n , ".join(init_list), |
+ trace_list="\n ".join(trace_list), |
reset_list="\n ".join(reset_list)) |
return header_lines, cpp_lines |