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

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

Issue 2163803002: [DevTools] Make WebInspector.ConsoleMessage 0-based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 */ 369 */
370 exceptionThrown: function(exceptionId, timestamp, details, exception, execut ionContextId) 370 exceptionThrown: function(exceptionId, timestamp, details, exception, execut ionContextId)
371 { 371 {
372 var consoleMessage = new WebInspector.ConsoleMessage( 372 var consoleMessage = new WebInspector.ConsoleMessage(
373 this._runtimeModel.target(), 373 this._runtimeModel.target(),
374 WebInspector.ConsoleMessage.MessageSource.JS, 374 WebInspector.ConsoleMessage.MessageSource.JS,
375 WebInspector.ConsoleMessage.MessageLevel.Error, 375 WebInspector.ConsoleMessage.MessageLevel.Error,
376 details.text, 376 details.text,
377 undefined, 377 undefined,
378 details.url, 378 details.url,
379 details.lineNumber + 1, 379 details.lineNumber,
380 details.columnNumber + 1, 380 details.columnNumber,
381 undefined, 381 undefined,
382 exception ? ["Uncaught (in promise)", exception] : undefined, 382 exception ? ["Uncaught (in promise)", exception] : undefined,
383 details.stackTrace, 383 details.stackTrace,
384 timestamp, 384 timestamp,
385 executionContextId, 385 executionContextId,
386 details.scriptId); 386 details.scriptId);
387 consoleMessage.setExceptionId(exceptionId); 387 consoleMessage.setExceptionId(exceptionId);
388 this._runtimeModel.target().consoleModel.addMessage(consoleMessage); 388 this._runtimeModel.target().consoleModel.addMessage(consoleMessage);
389 }, 389 },
390 390
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 else if (args.length && args[0].description) 439 else if (args.length && args[0].description)
440 message = args[0].description; 440 message = args[0].description;
441 var callFrame = stackTrace && stackTrace.callFrames.length ? stackTrace. callFrames[0] : null; 441 var callFrame = stackTrace && stackTrace.callFrames.length ? stackTrace. callFrames[0] : null;
442 var consoleMessage = new WebInspector.ConsoleMessage( 442 var consoleMessage = new WebInspector.ConsoleMessage(
443 this._runtimeModel.target(), 443 this._runtimeModel.target(),
444 WebInspector.ConsoleMessage.MessageSource.ConsoleAPI, 444 WebInspector.ConsoleMessage.MessageSource.ConsoleAPI,
445 level, 445 level,
446 /** @type {string} */ (message), 446 /** @type {string} */ (message),
447 type, 447 type,
448 callFrame ? callFrame.url : undefined, 448 callFrame ? callFrame.url : undefined,
449 callFrame ? callFrame.lineNumber + 1 : undefined, 449 callFrame ? callFrame.lineNumber : undefined,
450 callFrame ? callFrame.columnNumber + 1 : undefined, 450 callFrame ? callFrame.columnNumber : undefined,
451 undefined, 451 undefined,
452 args, 452 args,
453 stackTrace, 453 stackTrace,
454 timestamp, 454 timestamp,
455 executionContextId, 455 executionContextId,
456 undefined); 456 undefined);
457 this._runtimeModel.target().consoleModel.addMessage(consoleMessage); 457 this._runtimeModel.target().consoleModel.addMessage(consoleMessage);
458 }, 458 },
459 459
460 /** 460 /**
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 /** 1012 /**
1013 * @return {boolean} 1013 * @return {boolean}
1014 */ 1014 */
1015 isNormalListenerType: function() 1015 isNormalListenerType: function()
1016 { 1016 {
1017 return this._listenerType === "normal"; 1017 return this._listenerType === "normal";
1018 }, 1018 },
1019 1019
1020 __proto__: WebInspector.SDKObject.prototype 1020 __proto__: WebInspector.SDKObject.prototype
1021 } 1021 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698