Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1174)

Unified Diff: Source/core/inspector/CodeGeneratorInstrumentation.py

Issue 307943002: Oilpan: Prepare moving InspectorController and InspectorAgents to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/CodeGeneratorInstrumentation.py
diff --git a/Source/core/inspector/CodeGeneratorInstrumentation.py b/Source/core/inspector/CodeGeneratorInstrumentation.py
index 925e4cb60884659505a5004b0e269977b9c5a5e4..6aab4f4df55814a38bb6ada7d99f35c4ae81a73f 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
@@ -442,6 +449,7 @@ def generate_instrumenting_agents(used_agents):
accessor_list = []
member_list = []
init_list = []
+ trace_list = []
reset_list = []
for agent in agents:
@@ -454,14 +462,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(
@@ -473,6 +483,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
« no previous file with comments | « Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp ('k') | Source/core/inspector/InjectedScriptHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698