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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js

Issue 2146163002: [DevTools] Remove Console.messagesCleared event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2139543002
Patch Set: rebased on ToT Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js
index 485b88899e925c0967e92a4169290818b08b57ee..4dd24af5f80378435f7039854252cd0d472214ef 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js
@@ -82,6 +82,9 @@ WebInspector.ConsoleModel.prototype = {
if (msg.source === WebInspector.ConsoleMessage.MessageSource.Worker && msg.target().workerManager && msg.target().workerManager.targetByWorkerId(msg.workerId))
return;
+ if (msg.source === WebInspector.ConsoleMessage.MessageSource.ConsoleAPI && msg.type === WebInspector.ConsoleMessage.MessageType.Clear)
+ this.clear();
+
if (msg.level === WebInspector.ConsoleMessage.MessageLevel.RevokedError && msg._revokedExceptionId) {
var exceptionMessage = this._messageByExceptionId.get(msg._revokedExceptionId);
if (!exceptionMessage)
@@ -145,10 +148,10 @@ WebInspector.ConsoleModel.prototype = {
requestClearMessages: function()
{
this._consoleAgent.clearMessages();
- this._messagesCleared();
+ this.clear();
},
- _messagesCleared: function()
+ clear: function()
{
this._messages = [];
this._messageByExceptionId.clear();
@@ -563,8 +566,6 @@ WebInspector.ConsoleDispatcher.prototype = {
*/
messagesCleared: function()
{
- if (!WebInspector.moduleSetting("preserveConsoleLog").get())
- this._console._messagesCleared();
}
}

Powered by Google App Engine
This is Rietveld 408576698