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

Unified Diff: Source/devtools/front_end/sdk/DebuggerModel.js

Issue 272613002: DevTools: implemented scriptFailedToParse protocol event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/devtools/Inspector-1.1.json ('k') | Source/devtools/front_end/sdk/NetworkUISourceCodeProvider.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/DebuggerModel.js
diff --git a/Source/devtools/front_end/sdk/DebuggerModel.js b/Source/devtools/front_end/sdk/DebuggerModel.js
index bca8aaf441f7efe8bb421f10c6d1f5f02790cfa9..6abb699ab815557f997f7b26d090b012df0cf809 100644
--- a/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -494,12 +494,16 @@ WebInspector.DebuggerModel.prototype = {
* @param {boolean} isContentScript
* @param {string=} sourceMapURL
* @param {boolean=} hasSourceURL
+ * @param {boolean=} hasSyntaxError
*/
- _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
+ _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL, hasSyntaxError)
{
var script = new WebInspector.Script(this.target(), scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL);
this._registerScript(script);
- this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ParsedScriptSource, script);
+ if (!hasSyntaxError)
+ this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ParsedScriptSource, script);
+ else
+ this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.FailedToParseScriptSource, script);
},
/**
@@ -823,18 +827,23 @@ WebInspector.DebuggerDispatcher.prototype = {
*/
scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
{
- this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, !!isContentScript, sourceMapURL, hasSourceURL);
+ this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, !!isContentScript, sourceMapURL, hasSourceURL, false);
},
/**
+ * @param {!DebuggerAgent.ScriptId} scriptId
* @param {string} sourceURL
- * @param {string} source
- * @param {number} startingLine
- * @param {number} errorLine
- * @param {string} errorMessage
+ * @param {number} startLine
+ * @param {number} startColumn
+ * @param {number} endLine
+ * @param {number} endColumn
+ * @param {boolean=} isContentScript
+ * @param {string=} sourceMapURL
+ * @param {boolean=} hasSourceURL
*/
- scriptFailedToParse: function(sourceURL, source, startingLine, errorLine, errorMessage)
+ scriptFailedToParse: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
{
+ this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, !!isContentScript, sourceMapURL, hasSourceURL, true);
},
/**
« no previous file with comments | « Source/devtools/Inspector-1.1.json ('k') | Source/devtools/front_end/sdk/NetworkUISourceCodeProvider.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698