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

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

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (!result) 207 if (!result)
208 return; 208 return;
209 209
210 WebInspector.console.showPromise().then(reportUponEvaluation); 210 WebInspector.console.showPromise().then(reportUponEvaluation);
211 function reportUponEvaluation() 211 function reportUponEvaluation()
212 { 212 {
213 target.consoleModel.dispatchEventToListeners(WebInspector.ConsoleMod el.Events.CommandEvaluated, {result: result, wasThrown: wasThrown, text: request edText, commandMessage: commandMessage, exceptionDetails: exceptionDetails}); 213 target.consoleModel.dispatchEventToListeners(WebInspector.ConsoleMod el.Events.CommandEvaluated, {result: result, wasThrown: wasThrown, text: request edText, commandMessage: commandMessage, exceptionDetails: exceptionDetails});
214 } 214 }
215 } 215 }
216 if (/^\s*\{/.test(text) && /\}\s*$/.test(text)) 216 if (/^\s*\{/.test(text) && /\}\s*$/.test(text))
217 text = '(' + text + ')'; 217 text = "(" + text + ")";
218 executionContext.evaluate(text, "console", !!useCommandLineAPI, false, false , true, true, printResult); 218 executionContext.evaluate(text, "console", !!useCommandLineAPI, false, false , true, true, printResult);
219 219
220 WebInspector.userMetrics.actionTaken(WebInspector.UserMetrics.Action.Console Evaluated); 220 WebInspector.userMetrics.actionTaken(WebInspector.UserMetrics.Action.Console Evaluated);
221 } 221 }
222 222
223 WebInspector.ConsoleModel.clearConsole = function() 223 WebInspector.ConsoleModel.clearConsole = function()
224 { 224 {
225 var targets = WebInspector.targetManager.targets(); 225 var targets = WebInspector.targetManager.targets();
226 for (var i = 0; i < targets.length; ++i) 226 for (var i = 0; i < targets.length; ++i)
227 targets[i].consoleModel.requestClearMessages(); 227 targets[i].consoleModel.requestClearMessages();
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 Error: "error", 458 Error: "error",
459 Debug: "debug", 459 Debug: "debug",
460 RevokedError: "revokedError" 460 RevokedError: "revokedError"
461 }; 461 };
462 462
463 /** 463 /**
464 * @param {!WebInspector.ConsoleMessage} a 464 * @param {!WebInspector.ConsoleMessage} a
465 * @param {!WebInspector.ConsoleMessage} b 465 * @param {!WebInspector.ConsoleMessage} b
466 * @return {number} 466 * @return {number}
467 */ 467 */
468 WebInspector.ConsoleMessage.timestampComparator = function (a, b) 468 WebInspector.ConsoleMessage.timestampComparator = function(a, b)
469 { 469 {
470 return a.timestamp - b.timestamp; 470 return a.timestamp - b.timestamp;
471 } 471 }
472 472
473 /** 473 /**
474 * @constructor 474 * @constructor
475 * @implements {ConsoleAgent.Dispatcher} 475 * @implements {ConsoleAgent.Dispatcher}
476 * @param {!WebInspector.ConsoleModel} console 476 * @param {!WebInspector.ConsoleModel} console
477 */ 477 */
478 WebInspector.ConsoleDispatcher = function(console) 478 WebInspector.ConsoleDispatcher = function(console)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv aluated, event.data); 604 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv aluated, event.data);
605 }, 605 },
606 606
607 __proto__: WebInspector.Object.prototype 607 __proto__: WebInspector.Object.prototype
608 } 608 }
609 609
610 /** 610 /**
611 * @type {!WebInspector.MultitargetConsoleModel} 611 * @type {!WebInspector.MultitargetConsoleModel}
612 */ 612 */
613 WebInspector.multitargetConsoleModel; 613 WebInspector.multitargetConsoleModel;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698