| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 void PageConsoleAgent::disable(ErrorString* errorString) | 74 void PageConsoleAgent::disable(ErrorString* errorString) |
| 75 { | 75 { |
| 76 m_instrumentingAgents->setPageConsoleAgent(nullptr); | 76 m_instrumentingAgents->setPageConsoleAgent(nullptr); |
| 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 m_inspectorDOMAgent->releaseDanglingNodes(); | |
| 84 messageStorage()->clear(m_inspectedFrames->root()->document()); | 83 messageStorage()->clear(m_inspectedFrames->root()->document()); |
| 85 } | 84 } |
| 86 | 85 |
| 87 void PageConsoleAgent::workerConsoleAgentEnabled(WorkerInspectorProxy* workerIns
pectorProxy) | 86 void PageConsoleAgent::workerConsoleAgentEnabled(WorkerInspectorProxy* workerIns
pectorProxy) |
| 88 { | 87 { |
| 89 m_workersWithEnabledConsole.add(workerInspectorProxy); | 88 m_workersWithEnabledConsole.add(workerInspectorProxy); |
| 90 } | 89 } |
| 91 | 90 |
| 92 ConsoleMessageStorage* PageConsoleAgent::messageStorage() | 91 ConsoleMessageStorage* PageConsoleAgent::messageStorage() |
| 93 { | 92 { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 106 size_t messageCount = storage->size(); | 105 size_t messageCount = storage->size(); |
| 107 for (size_t i = 0; i < messageCount; ++i) { | 106 for (size_t i = 0; i < messageCount; ++i) { |
| 108 ConsoleMessage* message = storage->at(i); | 107 ConsoleMessage* message = storage->at(i); |
| 109 if (message->workerInspectorProxy() == workerInspectorProxy) { | 108 if (message->workerInspectorProxy() == workerInspectorProxy) { |
| 110 message->setWorkerInspectorProxy(nullptr); | 109 message->setWorkerInspectorProxy(nullptr); |
| 111 sendConsoleMessageToFrontend(message, false); | 110 sendConsoleMessageToFrontend(message, false); |
| 112 } | 111 } |
| 113 } | 112 } |
| 114 } | 113 } |
| 115 | 114 |
| 115 void PageConsoleAgent::consoleMessagesCleared() |
| 116 { |
| 117 m_inspectorDOMAgent->releaseDanglingNodes(); |
| 118 InspectorConsoleAgent::consoleMessagesCleared(); |
| 119 } |
| 120 |
| 116 void PageConsoleAgent::enableStackCapturingIfNeeded() | 121 void PageConsoleAgent::enableStackCapturingIfNeeded() |
| 117 { | 122 { |
| 118 if (!s_enabledAgentCount) | 123 if (!s_enabledAgentCount) |
| 119 ScriptController::setCaptureCallStackForUncaughtExceptions(toIsolate(m_i
nspectedFrames->root()), true); | 124 ScriptController::setCaptureCallStackForUncaughtExceptions(toIsolate(m_i
nspectedFrames->root()), true); |
| 120 ++s_enabledAgentCount; | 125 ++s_enabledAgentCount; |
| 121 } | 126 } |
| 122 | 127 |
| 123 void PageConsoleAgent::disableStackCapturingIfNeeded() | 128 void PageConsoleAgent::disableStackCapturingIfNeeded() |
| 124 { | 129 { |
| 125 if (!(--s_enabledAgentCount)) | 130 if (!(--s_enabledAgentCount)) |
| 126 ScriptController::setCaptureCallStackForUncaughtExceptions(toIsolate(m_i
nspectedFrames->root()), false); | 131 ScriptController::setCaptureCallStackForUncaughtExceptions(toIsolate(m_i
nspectedFrames->root()), false); |
| 127 } | 132 } |
| 128 | 133 |
| 129 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |