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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 /** 487 /**
488 * @param {!DebuggerAgent.ScriptId} scriptId 488 * @param {!DebuggerAgent.ScriptId} scriptId
489 * @param {string} sourceURL 489 * @param {string} sourceURL
490 * @param {number} startLine 490 * @param {number} startLine
491 * @param {number} startColumn 491 * @param {number} startColumn
492 * @param {number} endLine 492 * @param {number} endLine
493 * @param {number} endColumn 493 * @param {number} endColumn
494 * @param {boolean} isContentScript 494 * @param {boolean} isContentScript
495 * @param {string=} sourceMapURL 495 * @param {string=} sourceMapURL
496 * @param {boolean=} hasSourceURL 496 * @param {boolean=} hasSourceURL
497 * @param {boolean=} hasSyntaxError
497 */ 498 */
498 _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, isContentScript, sourceMapURL, hasSourceURL) 499 _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, isContentScript, sourceMapURL, hasSourceURL, hasSyntaxError)
499 { 500 {
500 var script = new WebInspector.Script(this.target(), scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasS ourceURL); 501 var script = new WebInspector.Script(this.target(), scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasS ourceURL);
501 this._registerScript(script); 502 this._registerScript(script);
502 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.ParsedSc riptSource, script); 503 if (!hasSyntaxError)
504 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Pars edScriptSource, script);
505 else
506 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Fail edToParseScriptSource, script);
503 }, 507 },
504 508
505 /** 509 /**
506 * @param {!WebInspector.Script} script 510 * @param {!WebInspector.Script} script
507 */ 511 */
508 _registerScript: function(script) 512 _registerScript: function(script)
509 { 513 {
510 this._scripts[script.scriptId] = script; 514 this._scripts[script.scriptId] = script;
511 if (script.isAnonymousScript()) 515 if (script.isAnonymousScript())
512 return; 516 return;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 * @param {number} startLine 820 * @param {number} startLine
817 * @param {number} startColumn 821 * @param {number} startColumn
818 * @param {number} endLine 822 * @param {number} endLine
819 * @param {number} endColumn 823 * @param {number} endColumn
820 * @param {boolean=} isContentScript 824 * @param {boolean=} isContentScript
821 * @param {string=} sourceMapURL 825 * @param {string=} sourceMapURL
822 * @param {boolean=} hasSourceURL 826 * @param {boolean=} hasSourceURL
823 */ 827 */
824 scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL) 828 scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
825 { 829 {
826 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, !!isContentScript, sourceMapURL, hasSourceURL); 830 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, !!isContentScript, sourceMapURL, hasSourceURL, false);
827 }, 831 },
828 832
829 /** 833 /**
834 * @param {!DebuggerAgent.ScriptId} scriptId
830 * @param {string} sourceURL 835 * @param {string} sourceURL
831 * @param {string} source 836 * @param {number} startLine
832 * @param {number} startingLine 837 * @param {number} startColumn
833 * @param {number} errorLine 838 * @param {number} endLine
834 * @param {string} errorMessage 839 * @param {number} endColumn
840 * @param {boolean=} isContentScript
841 * @param {string=} sourceMapURL
842 * @param {boolean=} hasSourceURL
835 */ 843 */
836 scriptFailedToParse: function(sourceURL, source, startingLine, errorLine, er rorMessage) 844 scriptFailedToParse: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, isContentScript, sourceMapURL, hasSourceURL)
837 { 845 {
846 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, !!isContentScript, sourceMapURL, hasSourceURL, true);
838 }, 847 },
839 848
840 /** 849 /**
841 * @param {!DebuggerAgent.BreakpointId} breakpointId 850 * @param {!DebuggerAgent.BreakpointId} breakpointId
842 * @param {!DebuggerAgent.Location} location 851 * @param {!DebuggerAgent.Location} location
843 */ 852 */
844 breakpointResolved: function(breakpointId, location) 853 breakpointResolved: function(breakpointId, location)
845 { 854 {
846 this._debuggerModel._breakpointResolved(breakpointId, location); 855 this._debuggerModel._breakpointResolved(breakpointId, location);
847 } 856 }
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 this.asyncStackTrace.dispose(); 1196 this.asyncStackTrace.dispose();
1188 }, 1197 },
1189 1198
1190 __proto__: WebInspector.SDKObject.prototype 1199 __proto__: WebInspector.SDKObject.prototype
1191 } 1200 }
1192 1201
1193 /** 1202 /**
1194 * @type {!WebInspector.DebuggerModel} 1203 * @type {!WebInspector.DebuggerModel}
1195 */ 1204 */
1196 WebInspector.debuggerModel; 1205 WebInspector.debuggerModel;
OLDNEW
« 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