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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js

Issue 2146333003: [DevTools] Replace SetScriptSourceError with ExceptionDetails in protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
index 9d1e09b4ebcb1f840c92b97c92067a01a13d4604..fc1a884dd99fb79606ca08662f5cb8819c98543f 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
@@ -358,28 +358,23 @@ WebInspector.ResourceScriptFile.prototype = {
/**
* @param {?string} error
- * @param {!DebuggerAgent.SetScriptSourceError=} errorData
+ * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
* @this {WebInspector.ResourceScriptFile}
*/
- function scriptSourceWasSet(error, errorData)
+ function scriptSourceWasSet(error, exceptionDetails)
{
- if (!error && !errorData)
+ if (!error && !exceptionDetails)
this._scriptSource = source;
this._update();
- if (!error && !errorData)
+ if (!error && !exceptionDetails)
return;
- var warningLevel = WebInspector.Console.MessageLevel.Warning;
- if (!errorData) {
- WebInspector.console.addMessage(WebInspector.UIString("LiveEdit failed: %s", error), warningLevel);
+ if (!exceptionDetails) {
+ WebInspector.console.addMessage(WebInspector.UIString("LiveEdit failed: %s", error), WebInspector.Console.MessageLevel.Warning);
return;
}
- if (errorData) {
- var messageText = WebInspector.UIString("LiveEdit compile failed: %s", errorData.message);
- this._uiSourceCode.addLineMessage(WebInspector.UISourceCode.Message.Level.Error, messageText, errorData.lineNumber - 1, errorData.columnNumber + 1);
- } else {
- WebInspector.console.addMessage(WebInspector.UIString("Unknown LiveEdit error: %s; %s", JSON.stringify(errorData), error), warningLevel);
- }
+ var messageText = WebInspector.UIString("LiveEdit compile failed: %s", exceptionDetails.text);
+ this._uiSourceCode.addLineMessage(WebInspector.UISourceCode.Message.Level.Error, messageText, exceptionDetails.lineNumber, exceptionDetails.columnNumber);
}
},

Powered by Google App Engine
This is Rietveld 408576698