OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 private: | 73 private: |
74 WorkerThread* m_thread; | 74 WorkerThread* m_thread; |
75 WorkerContext* m_workerContext; | 75 WorkerContext* m_workerContext; |
76 }; | 76 }; |
77 | 77 |
78 } // namespace | 78 } // namespace |
79 | 79 |
80 const char* WorkerDebuggerAgent::debuggerTaskMode = "debugger"; | 80 const char* WorkerDebuggerAgent::debuggerTaskMode = "debugger"; |
81 | 81 |
82 PassOwnPtr<WorkerDebuggerAgent> WorkerDebuggerAgent::create(InstrumentingAgents*
instrumentingAgents, InspectorCompositeState* inspectorState, WorkerScriptDebug
Server* scriptDebugServer, WorkerContext* inspectedWorkerContext, InjectedScript
Manager* injectedScriptManager) | 82 PassRefPtr<WorkerDebuggerAgent> WorkerDebuggerAgent::create(InstrumentingAgents*
instrumentingAgents, InspectorState* inspectorState, WorkerScriptDebugServer* s
criptDebugServer, WorkerContext* inspectedWorkerContext, InjectedScriptManager*
injectedScriptManager) |
83 { | 83 { |
84 return adoptPtr(new WorkerDebuggerAgent(instrumentingAgents, inspectorState,
scriptDebugServer, inspectedWorkerContext, injectedScriptManager)); | 84 return adoptRef(new WorkerDebuggerAgent(instrumentingAgents, inspectorState,
scriptDebugServer, inspectedWorkerContext, injectedScriptManager)); |
85 } | 85 } |
86 | 86 |
87 WorkerDebuggerAgent::WorkerDebuggerAgent(InstrumentingAgents* instrumentingAgent
s, InspectorCompositeState* inspectorState, WorkerScriptDebugServer* scriptDebug
Server, WorkerContext* inspectedWorkerContext, InjectedScriptManager* injectedSc
riptManager) | 87 WorkerDebuggerAgent::WorkerDebuggerAgent(InstrumentingAgents* instrumentingAgent
s, InspectorState* inspectorState, WorkerScriptDebugServer* scriptDebugServer, W
orkerContext* inspectedWorkerContext, InjectedScriptManager* injectedScriptManag
er) |
88 : InspectorDebuggerAgent(instrumentingAgents, inspectorState, injectedScript
Manager) | 88 : InspectorDebuggerAgent(instrumentingAgents, inspectorState, injectedScript
Manager) |
89 , m_scriptDebugServer(scriptDebugServer) | 89 , m_scriptDebugServer(scriptDebugServer) |
90 , m_inspectedWorkerContext(inspectedWorkerContext) | 90 , m_inspectedWorkerContext(inspectedWorkerContext) |
91 { | 91 { |
92 MutexLocker lock(workerDebuggerAgentsMutex()); | 92 MutexLocker lock(workerDebuggerAgentsMutex()); |
93 workerDebuggerAgents().set(inspectedWorkerContext->thread(), this); | 93 workerDebuggerAgents().set(inspectedWorkerContext->thread(), this); |
94 } | 94 } |
95 | 95 |
96 WorkerDebuggerAgent::~WorkerDebuggerAgent() | 96 WorkerDebuggerAgent::~WorkerDebuggerAgent() |
97 { | 97 { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // We don't need to mute console for workers. | 143 // We don't need to mute console for workers. |
144 } | 144 } |
145 | 145 |
146 void WorkerDebuggerAgent::addConsoleMessage(MessageSource source, MessageLevel l
evel, const String& message, const String& sourceURL) | 146 void WorkerDebuggerAgent::addConsoleMessage(MessageSource source, MessageLevel l
evel, const String& message, const String& sourceURL) |
147 { | 147 { |
148 ScriptExecutionContext* context = m_inspectedWorkerContext; | 148 ScriptExecutionContext* context = m_inspectedWorkerContext; |
149 context->addConsoleMessage(source, level, message, sourceURL, 0); | 149 context->addConsoleMessage(source, level, message, sourceURL, 0); |
150 } | 150 } |
151 | 151 |
152 } // namespace WebCore | 152 } // namespace WebCore |
OLD | NEW |