| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 visitor->trace(m_inspectorDOMAgent); | 61 visitor->trace(m_inspectorDOMAgent); |
| 62 visitor->trace(m_inspectedFrames); | 62 visitor->trace(m_inspectedFrames); |
| 63 visitor->trace(m_workersWithEnabledConsole); | 63 visitor->trace(m_workersWithEnabledConsole); |
| 64 InspectorConsoleAgent::trace(visitor); | 64 InspectorConsoleAgent::trace(visitor); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void PageConsoleAgent::enable(ErrorString* errorString) | 67 void PageConsoleAgent::enable(ErrorString* errorString) |
| 68 { | 68 { |
| 69 InspectorConsoleAgent::enable(errorString); | 69 InspectorConsoleAgent::enable(errorString); |
| 70 m_workersWithEnabledConsole.clear(); | 70 m_workersWithEnabledConsole.clear(); |
| 71 m_instrumentingAgents->setPageConsoleAgent(this); | 71 m_instrumentingAgents->addPageConsoleAgent(this); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void PageConsoleAgent::disable(ErrorString* errorString) | 74 void PageConsoleAgent::disable(ErrorString* errorString) |
| 75 { | 75 { |
| 76 m_instrumentingAgents->setPageConsoleAgent(nullptr); | 76 m_instrumentingAgents->removePageConsoleAgent(this); |
| 77 InspectorConsoleAgent::disable(errorString); | 77 InspectorConsoleAgent::disable(errorString); |
| 78 m_workersWithEnabledConsole.clear(); | 78 m_workersWithEnabledConsole.clear(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void PageConsoleAgent::clearMessages(ErrorString* errorString) | 81 void PageConsoleAgent::clearMessages(ErrorString* errorString) |
| 82 { | 82 { |
| 83 messageStorage()->clear(m_inspectedFrames->root()->document()); | 83 messageStorage()->clear(m_inspectedFrames->root()->document()); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void PageConsoleAgent::workerConsoleAgentEnabled(WorkerInspectorProxy* workerIns
pectorProxy) | 86 void PageConsoleAgent::workerConsoleAgentEnabled(WorkerInspectorProxy* workerIns
pectorProxy) |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 ++s_enabledAgentCount; | 125 ++s_enabledAgentCount; |
| 126 } | 126 } |
| 127 | 127 |
| 128 void PageConsoleAgent::disableStackCapturingIfNeeded() | 128 void PageConsoleAgent::disableStackCapturingIfNeeded() |
| 129 { | 129 { |
| 130 if (!(--s_enabledAgentCount)) | 130 if (!(--s_enabledAgentCount)) |
| 131 ScriptController::setCaptureCallStackForUncaughtExceptions(toIsolate(m_i
nspectedFrames->root()), false); | 131 ScriptController::setCaptureCallStackForUncaughtExceptions(toIsolate(m_i
nspectedFrames->root()), false); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |