Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: third_party/WebKit/Source/core/inspector/PageConsoleAgent.cpp

Issue 1924173002: [DevTools] Improve performance of InstrumentingAgents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698