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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 void appendAsyncCallStack(ExecutionContext* executionContext, ScriptCallStack* c
allStack) | 128 void appendAsyncCallStack(ExecutionContext* executionContext, ScriptCallStack* c
allStack) |
129 { | 129 { |
130 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC
ontext); | 130 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC
ontext); |
131 if (!instrumentingAgents) | 131 if (!instrumentingAgents) |
132 return; | 132 return; |
133 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDe
buggerAgent()) | 133 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDe
buggerAgent()) |
134 callStack->setAsyncCallStack(debuggerAgent->currentAsyncStackTraceForCon
sole()); | 134 callStack->setAsyncCallStack(debuggerAgent->currentAsyncStackTraceForCon
sole()); |
135 } | 135 } |
136 | 136 |
137 bool canvasAgentEnabled(ExecutionContext* executionContext) | |
138 { | |
139 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC
ontext); | |
140 return instrumentingAgents && instrumentingAgents->inspectorCanvasAgent(); | |
141 } | |
142 | |
143 bool consoleAgentEnabled(ExecutionContext* executionContext) | 137 bool consoleAgentEnabled(ExecutionContext* executionContext) |
144 { | 138 { |
145 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC
ontext); | 139 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC
ontext); |
146 InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAge
nts->inspectorConsoleAgent() : 0; | 140 InspectorConsoleAgent* consoleAgent = instrumentingAgents ? instrumentingAge
nts->inspectorConsoleAgent() : 0; |
147 return consoleAgent && consoleAgent->enabled(); | 141 return consoleAgent && consoleAgent->enabled(); |
148 } | 142 } |
149 | 143 |
150 void registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents) | 144 void registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents) |
151 { | 145 { |
152 ASSERT(isMainThread()); | 146 ASSERT(isMainThread()); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 215 |
222 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work
erGlobalScope) | 216 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work
erGlobalScope) |
223 { | 217 { |
224 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect
orController()) | 218 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect
orController()) |
225 return controller->m_instrumentingAgents.get(); | 219 return controller->m_instrumentingAgents.get(); |
226 return 0; | 220 return 0; |
227 } | 221 } |
228 | 222 |
229 } // namespace blink | 223 } // namespace blink |
230 | 224 |
OLD | NEW |