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

Side by Side Diff: Source/core/inspector/InjectedScriptHost.cpp

Issue 306053010: Tried using CrossThreadPersistent for workerDebuggerAgents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptHost.h ('k') | Source/core/inspector/InjectedScriptHost.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698