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

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

Issue 2863183003: DevTools: report adding mutation event listener as a violations. (Closed)
Patch Set: same Created 3 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/inspector/InspectorLogAgent.h" 5 #include "core/inspector/InspectorLogAgent.h"
6 6
7 #include "bindings/core/v8/SourceLocation.h" 7 #include "bindings/core/v8/SourceLocation.h"
8 #include "core/frame/PerformanceMonitor.h" 8 #include "core/frame/PerformanceMonitor.h"
9 #include "core/inspector/ConsoleMessage.h" 9 #include "core/inspector/ConsoleMessage.h"
10 #include "core/inspector/ConsoleMessageStorage.h" 10 #include "core/inspector/ConsoleMessageStorage.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 lround(duration * 1000)); 218 lround(duration * 1000));
219 ConsoleMessage* message = ConsoleMessage::Create( 219 ConsoleMessage* message = ConsoleMessage::Create(
220 kViolationMessageSource, kVerboseMessageLevel, message_text); 220 kViolationMessageSource, kVerboseMessageLevel, message_text);
221 ConsoleMessageAdded(message); 221 ConsoleMessageAdded(message);
222 } 222 }
223 223
224 void InspectorLogAgent::ReportGenericViolation(PerformanceMonitor::Violation, 224 void InspectorLogAgent::ReportGenericViolation(PerformanceMonitor::Violation,
225 const String& text, 225 const String& text,
226 double time, 226 double time,
227 SourceLocation* location) { 227 SourceLocation* location) {
228 location->TakeStackTrace();
229 ConsoleMessage* message = ConsoleMessage::Create( 228 ConsoleMessage* message = ConsoleMessage::Create(
230 kViolationMessageSource, kVerboseMessageLevel, text, location->Clone()); 229 kViolationMessageSource, kVerboseMessageLevel, text, location->Clone());
231 ConsoleMessageAdded(message); 230 ConsoleMessageAdded(message);
232 }; 231 };
233 232
234 } // namespace blink 233 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698