OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include "core/inspector/InstrumentingAgents.h" | 38 #include "core/inspector/InstrumentingAgents.h" |
39 #include "platform/JSONValues.h" | 39 #include "platform/JSONValues.h" |
40 | 40 |
41 #include "wtf/RefPtr.h" | 41 #include "wtf/RefPtr.h" |
42 #include "wtf/text/StringBuilder.h" | 42 #include "wtf/text/StringBuilder.h" |
43 | 43 |
44 using namespace std; | 44 using namespace std; |
45 | 45 |
46 namespace WebCore { | 46 namespace WebCore { |
47 | 47 |
48 PassRefPtr<InjectedScriptHost> InjectedScriptHost::create() | 48 PassRefPtrWillBeRawPtr<InjectedScriptHost> InjectedScriptHost::create() |
49 { | 49 { |
50 return adoptRef(new InjectedScriptHost()); | 50 return adoptRefWillBeNoop(new InjectedScriptHost()); |
51 } | 51 } |
52 | 52 |
53 InjectedScriptHost::InjectedScriptHost() | 53 InjectedScriptHost::InjectedScriptHost() |
54 : m_instrumentingAgents(0) | 54 : m_instrumentingAgents(nullptr) |
55 , m_scriptDebugServer(0) | 55 , m_scriptDebugServer(0) |
56 { | 56 { |
57 ScriptWrappable::init(this); | 57 ScriptWrappable::init(this); |
58 m_defaultInspectableObject = adoptPtr(new InspectableObject()); | 58 m_defaultInspectableObject = adoptPtr(new InspectableObject()); |
59 } | 59 } |
60 | 60 |
61 InjectedScriptHost::~InjectedScriptHost() | 61 InjectedScriptHost::~InjectedScriptHost() |
62 { | 62 { |
63 } | 63 } |
64 | 64 |
| 65 void InjectedScriptHost::trace(Visitor* visitor) |
| 66 { |
| 67 visitor->trace(m_instrumentingAgents); |
| 68 } |
| 69 |
65 void InjectedScriptHost::disconnect() | 70 void InjectedScriptHost::disconnect() |
66 { | 71 { |
67 m_instrumentingAgents = 0; | 72 m_instrumentingAgents = nullptr; |
68 m_scriptDebugServer = 0; | 73 m_scriptDebugServer = 0; |
69 } | 74 } |
70 | 75 |
71 void InjectedScriptHost::inspectImpl(PassRefPtr<JSONValue> object, PassRefPtr<JS
ONValue> hints) | 76 void InjectedScriptHost::inspectImpl(PassRefPtr<JSONValue> object, PassRefPtr<JS
ONValue> hints) |
72 { | 77 { |
73 if (InspectorInspectorAgent* inspectorAgent = m_instrumentingAgents ? m_inst
rumentingAgents->inspectorInspectorAgent() : 0) { | 78 if (InspectorInspectorAgent* inspectorAgent = m_instrumentingAgents ? m_inst
rumentingAgents->inspectorInspectorAgent() : 0) { |
74 RefPtr<TypeBuilder::Runtime::RemoteObject> remoteObject = TypeBuilder::R
untime::RemoteObject::runtimeCast(object); | 79 RefPtr<TypeBuilder::Runtime::RemoteObject> remoteObject = TypeBuilder::R
untime::RemoteObject::runtimeCast(object); |
75 inspectorAgent->inspect(remoteObject, hints->asObject()); | 80 inspectorAgent->inspect(remoteObject, hints->asObject()); |
76 } | 81 } |
77 } | 82 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 144 } |
140 | 145 |
141 void InjectedScriptHost::unmonitorFunction(const String& scriptId, int lineNumbe
r, int columnNumber) | 146 void InjectedScriptHost::unmonitorFunction(const String& scriptId, int lineNumbe
r, int columnNumber) |
142 { | 147 { |
143 if (InspectorDebuggerAgent* debuggerAgent = m_instrumentingAgents ? m_instru
mentingAgents->inspectorDebuggerAgent() : 0) | 148 if (InspectorDebuggerAgent* debuggerAgent = m_instrumentingAgents ? m_instru
mentingAgents->inspectorDebuggerAgent() : 0) |
144 debuggerAgent->removeBreakpoint(scriptId, lineNumber, columnNumber, Insp
ectorDebuggerAgent::MonitorCommandBreakpointSource); | 149 debuggerAgent->removeBreakpoint(scriptId, lineNumber, columnNumber, Insp
ectorDebuggerAgent::MonitorCommandBreakpointSource); |
145 } | 150 } |
146 | 151 |
147 } // namespace WebCore | 152 } // namespace WebCore |
148 | 153 |
OLD | NEW |