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

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

Issue 2249743006: [DevTools] Fill ExceptionDetails with more details, unify usage across protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: browser test Created 4 years, 4 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 /** 377 /**
378 * @override 378 * @override
379 */ 379 */
380 executionContextsCleared: function() 380 executionContextsCleared: function()
381 { 381 {
382 this._runtimeModel._executionContextsCleared(); 382 this._runtimeModel._executionContextsCleared();
383 }, 383 },
384 384
385 /** 385 /**
386 * @override 386 * @override
387 * @param {number} exceptionId
388 * @param {number} timestamp 387 * @param {number} timestamp
389 * @param {!RuntimeAgent.ExceptionDetails} details 388 * @param {!RuntimeAgent.ExceptionDetails} exceptionDetails
390 * @param {!RuntimeAgent.RemoteObject=} exception
391 * @param {number=} executionContextId
392 */ 389 */
393 exceptionThrown: function(exceptionId, timestamp, details, exception, execut ionContextId) 390 exceptionThrown: function(timestamp, exceptionDetails)
394 { 391 {
395 var consoleMessage = new WebInspector.ConsoleMessage( 392 var consoleMessage = WebInspector.ConsoleMessage.fromException(this._run timeModel.target(), exceptionDetails, undefined, timestamp, undefined);
396 this._runtimeModel.target(), 393 consoleMessage.setExceptionId(exceptionDetails.exceptionId);
397 WebInspector.ConsoleMessage.MessageSource.JS,
398 WebInspector.ConsoleMessage.MessageLevel.Error,
399 details.text,
400 undefined,
401 details.url,
402 details.lineNumber,
403 details.columnNumber,
404 undefined,
405 exception ? [WebInspector.RemoteObject.fromLocalObject(details.text) , exception] : undefined,
406 details.stackTrace,
407 timestamp,
408 executionContextId,
409 details.scriptId);
410 consoleMessage.setExceptionId(exceptionId);
411 this._runtimeModel.target().consoleModel.addMessage(consoleMessage); 394 this._runtimeModel.target().consoleModel.addMessage(consoleMessage);
412 }, 395 },
413 396
414 /** 397 /**
415 * @override 398 * @override
416 * @param {string} message 399 * @param {string} reason
417 * @param {number} exceptionId 400 * @param {number} exceptionId
418 */ 401 */
419 exceptionRevoked: function(message, exceptionId) 402 exceptionRevoked: function(reason, exceptionId)
420 { 403 {
421 var consoleMessage = new WebInspector.ConsoleMessage( 404 var consoleMessage = new WebInspector.ConsoleMessage(
422 this._runtimeModel.target(), 405 this._runtimeModel.target(),
423 WebInspector.ConsoleMessage.MessageSource.JS, 406 WebInspector.ConsoleMessage.MessageSource.JS,
424 WebInspector.ConsoleMessage.MessageLevel.RevokedError, 407 WebInspector.ConsoleMessage.MessageLevel.RevokedError,
425 message, 408 reason,
426 undefined, 409 undefined,
427 undefined, 410 undefined,
428 undefined, 411 undefined,
429 undefined, 412 undefined,
430 undefined, 413 undefined,
431 undefined, 414 undefined,
432 undefined, 415 undefined,
433 undefined, 416 undefined,
434 undefined, 417 undefined,
435 undefined); 418 undefined);
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 /** 1011 /**
1029 * @return {boolean} 1012 * @return {boolean}
1030 */ 1013 */
1031 isNormalListenerType: function() 1014 isNormalListenerType: function()
1032 { 1015 {
1033 return this._listenerType === "normal"; 1016 return this._listenerType === "normal";
1034 }, 1017 },
1035 1018
1036 __proto__: WebInspector.SDKObject.prototype 1019 __proto__: WebInspector.SDKObject.prototype
1037 } 1020 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698