Chromium Code Reviews| 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 19 matching lines...) Expand all Loading... | |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/inspector/InspectorInstrumentation.h" | 32 #include "core/inspector/InspectorInstrumentation.h" |
| 33 | 33 |
| 34 #include "core/events/EventTarget.h" | 34 #include "core/events/EventTarget.h" |
| 35 #include "core/fetch/FetchInitiatorInfo.h" | 35 #include "core/fetch/FetchInitiatorInfo.h" |
| 36 #include "core/frame/FrameHost.h" | 36 #include "core/frame/FrameHost.h" |
| 37 #include "core/inspector/InspectorCSSAgent.h" | 37 #include "core/inspector/InspectorCSSAgent.h" |
| 38 #include "core/inspector/InspectorConsoleAgent.h" | 38 #include "core/inspector/InspectorConsoleAgent.h" |
| 39 #include "core/inspector/InspectorDebuggerAgent.h" | 39 #include "core/inspector/InspectorDebuggerAgent.h" |
| 40 #include "core/inspector/InspectorInspectorAgent.h" | |
| 41 #include "core/inspector/InspectorProfilerAgent.h" | 40 #include "core/inspector/InspectorProfilerAgent.h" |
| 42 #include "core/inspector/InspectorResourceAgent.h" | 41 #include "core/inspector/InspectorResourceAgent.h" |
| 43 #include "core/inspector/InstrumentingAgents.h" | 42 #include "core/inspector/InstrumentingAgents.h" |
| 44 #include "core/inspector/ScriptAsyncCallStack.h" | 43 #include "core/inspector/ScriptAsyncCallStack.h" |
| 45 #include "core/inspector/ScriptCallStack.h" | 44 #include "core/inspector/ScriptCallStack.h" |
| 46 #include "core/inspector/WorkerInspectorController.h" | 45 #include "core/inspector/WorkerInspectorController.h" |
| 47 #include "core/page/Page.h" | 46 #include "core/page/Page.h" |
| 48 #include "core/workers/WorkerGlobalScope.h" | 47 #include "core/workers/WorkerGlobalScope.h" |
| 49 | 48 |
| 50 namespace blink { | 49 namespace blink { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 if (!instrumentingAgentsSet) | 111 if (!instrumentingAgentsSet) |
| 113 return; | 112 return; |
| 114 for (InstrumentingAgents* instrumentingAgents: *instrumentingAgentsSet) { | 113 for (InstrumentingAgents* instrumentingAgents: *instrumentingAgentsSet) { |
| 115 if (InspectorResourceAgent* inspectorResourceAgent = instrumentingAgents ->inspectorResourceAgent()) | 114 if (InspectorResourceAgent* inspectorResourceAgent = instrumentingAgents ->inspectorResourceAgent()) |
| 116 inspectorResourceAgent->willDestroyResource(cachedResource); | 115 inspectorResourceAgent->willDestroyResource(cachedResource); |
| 117 } | 116 } |
| 118 } | 117 } |
| 119 | 118 |
| 120 bool collectingHTMLParseErrorsImpl(InstrumentingAgents* instrumentingAgents) | 119 bool collectingHTMLParseErrorsImpl(InstrumentingAgents* instrumentingAgents) |
| 121 { | 120 { |
| 122 if (InspectorInspectorAgent* inspectorAgent = instrumentingAgents->inspector InspectorAgent()) | 121 if (!instrumentingAgentsSet) |
|
yurys
2015/03/26 12:55:33
Can you add an assert that instrumentingAgentsSet
dgozman
2015/03/26 15:52:59
Done.
| |
| 123 return inspectorAgent->hasFrontend(); | 122 return false; |
| 124 return false; | 123 return instrumentingAgentsSet->contains(instrumentingAgents); |
| 125 } | 124 } |
| 126 | 125 |
| 127 void appendAsyncCallStack(ExecutionContext* executionContext, ScriptCallStack* c allStack) | 126 void appendAsyncCallStack(ExecutionContext* executionContext, ScriptCallStack* c allStack) |
| 128 { | 127 { |
| 129 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC ontext); | 128 InstrumentingAgents* instrumentingAgents = instrumentingAgentsFor(executionC ontext); |
| 130 if (!instrumentingAgents) | 129 if (!instrumentingAgents) |
| 131 return; | 130 return; |
| 132 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDe buggerAgent()) | 131 if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDe buggerAgent()) |
| 133 callStack->setAsyncCallStack(debuggerAgent->currentAsyncStackTraceForCon sole()); | 132 callStack->setAsyncCallStack(debuggerAgent->currentAsyncStackTraceForCon sole()); |
| 134 } | 133 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 | 217 |
| 219 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work erGlobalScope) | 218 InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobalScope* work erGlobalScope) |
| 220 { | 219 { |
| 221 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect orController()) | 220 if (WorkerInspectorController* controller = workerGlobalScope->workerInspect orController()) |
| 222 return controller->m_instrumentingAgents.get(); | 221 return controller->m_instrumentingAgents.get(); |
| 223 return 0; | 222 return 0; |
| 224 } | 223 } |
| 225 | 224 |
| 226 } // namespace blink | 225 } // namespace blink |
| 227 | 226 |
| OLD | NEW |