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

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

Issue 2116563003: [DevTools] Report unhandled exceptions and promise rejections through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after ExceptionDetails change 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 /** 332 /**
333 * @override 333 * @override
334 */ 334 */
335 executionContextsCleared: function() 335 executionContextsCleared: function()
336 { 336 {
337 this._runtimeModel._executionContextsCleared(); 337 this._runtimeModel._executionContextsCleared();
338 }, 338 },
339 339
340 /** 340 /**
341 * @override 341 * @override
342 * @param {number} exceptionId
343 * @param {number} timestamp
344 * @param {!RuntimeAgent.ExceptionDetails} details
345 * @param {!RuntimeAgent.RemoteObject=} exception
346 * @param {number=} executionContextId
347 */
348 exceptionThrown: function(exceptionId, timestamp, details, exception, execut ionContextId)
349 {
350 var consoleMessage = new WebInspector.ConsoleMessage(
351 this._runtimeModel.target(),
352 WebInspector.ConsoleMessage.MessageSource.JS,
353 WebInspector.ConsoleMessage.MessageLevel.Error,
354 details.text,
355 undefined,
356 details.url,
357 typeof details.lineNumber === "undefined" ? undefined : details.line Number + 1,
358 typeof details.columnNumber === "undefined" ? undefined : details.co lumnNumber + 1,
359 undefined,
360 exception ? ["Uncaught (in promise)", exception] : undefined,
361 details.stack,
362 timestamp,
363 executionContextId,
364 details.scriptId);
365 consoleMessage.setExceptionId(exceptionId);
366 this._runtimeModel.target().consoleModel.addMessage(consoleMessage);
367 },
368
369 /**
370 * @override
371 * @param {number} timestamp
372 * @param {string} message
373 * @param {number} exceptionId
374 */
375 exceptionRevoked: function(timestamp, message, exceptionId)
376 {
377 var consoleMessage = new WebInspector.ConsoleMessage(
378 this._runtimeModel.target(),
379 WebInspector.ConsoleMessage.MessageSource.JS,
380 WebInspector.ConsoleMessage.MessageLevel.RevokedError,
381 message,
382 undefined,
383 undefined,
384 undefined,
385 undefined,
386 undefined,
387 undefined,
388 undefined,
389 timestamp,
390 undefined,
391 undefined);
392 consoleMessage.setRevokedExceptionId(exceptionId);
393 this._runtimeModel.target().consoleModel.addMessage(consoleMessage);
394 },
395
396 /**
397 * @override
342 * @param {!RuntimeAgent.RemoteObject} payload 398 * @param {!RuntimeAgent.RemoteObject} payload
343 * @param {!Object=} hints 399 * @param {!Object=} hints
344 */ 400 */
345 inspectRequested: function(payload, hints) 401 inspectRequested: function(payload, hints)
346 { 402 {
347 this._runtimeModel._inspectRequested(payload, hints); 403 this._runtimeModel._inspectRequested(payload, hints);
348 } 404 }
349 } 405 }
350 406
351 /** 407 /**
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 /** 952 /**
897 * @return {boolean} 953 * @return {boolean}
898 */ 954 */
899 isNormalListenerType: function() 955 isNormalListenerType: function()
900 { 956 {
901 return this._listenerType === "normal"; 957 return this._listenerType === "normal";
902 }, 958 },
903 959
904 __proto__: WebInspector.SDKObject.prototype 960 __proto__: WebInspector.SDKObject.prototype
905 } 961 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698