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

Unified Diff: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js b/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
index f51798300b9e46ed2a087110635722c75a93783e..ae01dd288536225138f84724bdd51b7f2fa02111 100644
--- a/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js
@@ -248,10 +248,10 @@ WebInspector.ScriptSnippetModel.prototype = {
if (mapping.evaluationIndex(uiSourceCode) !== evaluationIndex)
return;
- var script = /** @type {!WebInspector.Script} */(executionContext.debuggerModel.scriptForId(scriptId || exceptionDetails.scriptId));
+ var script = /** @type {!WebInspector.Script} */(executionContext.debuggerModel.scriptForId(/** @type {string} */ (scriptId || exceptionDetails.scriptId)));
mapping._addScript(script, uiSourceCode);
if (!scriptId) {
- this._printRunOrCompileScriptResultFailure(target, exceptionDetails, evaluationUrl);
+ this._printRunOrCompileScriptResultFailure(target, /** @type {!RuntimeAgent.ExceptionDetails} */ (exceptionDetails), evaluationUrl);
return;
}
@@ -315,27 +315,12 @@ WebInspector.ScriptSnippetModel.prototype = {
/**
* @param {!WebInspector.Target} target
- * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails
+ * @param {!RuntimeAgent.ExceptionDetails} exceptionDetails
* @param {?string=} sourceURL
*/
_printRunOrCompileScriptResultFailure: function(target, exceptionDetails, sourceURL)
{
- var consoleMessage = new WebInspector.ConsoleMessage(
- target,
- exceptionDetails.source,
- WebInspector.ConsoleMessage.MessageLevel.Error,
- exceptionDetails.text,
- undefined,
- sourceURL,
- exceptionDetails.lineNumber,
- exceptionDetails.columnNumber,
- undefined,
- undefined,
- exceptionDetails.stackTrace,
- undefined,
- undefined,
- exceptionDetails.stackTrace ? undefined : exceptionDetails.scriptId);
- target.consoleModel.addMessage(consoleMessage);
+ target.consoleModel.addMessage(WebInspector.ConsoleMessage.fromException(target, exceptionDetails, undefined, undefined, sourceURL || undefined));
},
/**

Powered by Google App Engine
This is Rietveld 408576698