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

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

Issue 2235743004: [DevTools] Removed deprecatedCommentWasUsed flag from protocol scriptParsed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 * @param {number} startColumn 460 * @param {number} startColumn
461 * @param {number} endLine 461 * @param {number} endLine
462 * @param {number} endColumn 462 * @param {number} endColumn
463 * @param {!RuntimeAgent.ExecutionContextId} executionContextId 463 * @param {!RuntimeAgent.ExecutionContextId} executionContextId
464 * @param {string} hash 464 * @param {string} hash
465 * @param {*|undefined} executionContextAuxData 465 * @param {*|undefined} executionContextAuxData
466 * @param {boolean} isInternalScript 466 * @param {boolean} isInternalScript
467 * @param {boolean} isLiveEdit 467 * @param {boolean} isLiveEdit
468 * @param {string=} sourceMapURL 468 * @param {string=} sourceMapURL
469 * @param {boolean=} hasSourceURL 469 * @param {boolean=} hasSourceURL
470 * @param {boolean=} deprecatedCommentWasUsed
471 * @param {boolean=} hasSyntaxError 470 * @param {boolean=} hasSyntaxError
472 * @return {!WebInspector.Script} 471 * @return {!WebInspector.Script}
473 */ 472 */
474 _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, executionContextId, hash, executionContextAuxData, isInternal Script, isLiveEdit, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed, hasSyn taxError) 473 _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, executionContextId, hash, executionContextAuxData, isInternal Script, isLiveEdit, sourceMapURL, hasSourceURL, hasSyntaxError)
475 { 474 {
476 var isContentScript = false; 475 var isContentScript = false;
477 if (executionContextAuxData && ("isDefault" in executionContextAuxData)) 476 if (executionContextAuxData && ("isDefault" in executionContextAuxData))
478 isContentScript = !executionContextAuxData["isDefault"]; 477 isContentScript = !executionContextAuxData["isDefault"];
479 var script = new WebInspector.Script(this, scriptId, sourceURL, startLin e, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, i sInternalScript, isLiveEdit, sourceMapURL, hasSourceURL); 478 var script = new WebInspector.Script(this, scriptId, sourceURL, startLin e, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, i sInternalScript, isLiveEdit, sourceMapURL, hasSourceURL);
480 this._registerScript(script); 479 this._registerScript(script);
481 if (!hasSyntaxError) 480 if (!hasSyntaxError)
482 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Pars edScriptSource, script); 481 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Pars edScriptSource, script);
483 else 482 else
484 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Fail edToParseScriptSource, script); 483 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Fail edToParseScriptSource, script);
485
486 if (deprecatedCommentWasUsed) {
487 var text = WebInspector.UIString("'//@ sourceURL' and '//@ sourceMap pingURL' are deprecated, please use '//# sourceURL=' and '//# sourceMappingURL=' instead.");
488 var msg = new WebInspector.ConsoleMessage(this.target(), WebInspecto r.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageLevel.Warn ing, text, undefined, undefined, undefined, undefined, undefined, undefined, und efined, undefined, undefined, scriptId);
489 var consoleModel = this.target().consoleModel;
490 if (consoleModel)
491 consoleModel.addMessage(msg);
492 }
493 return script; 484 return script;
494 }, 485 },
495 486
496 /** 487 /**
497 * @param {!WebInspector.Script} script 488 * @param {!WebInspector.Script} script
498 */ 489 */
499 _registerScript: function(script) 490 _registerScript: function(script)
500 { 491 {
501 this._scripts[script.scriptId] = script; 492 this._scripts[script.scriptId] = script;
502 if (script.isAnonymousScript()) 493 if (script.isAnonymousScript())
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 * @param {number} startColumn 844 * @param {number} startColumn
854 * @param {number} endLine 845 * @param {number} endLine
855 * @param {number} endColumn 846 * @param {number} endColumn
856 * @param {!RuntimeAgent.ExecutionContextId} executionContextId 847 * @param {!RuntimeAgent.ExecutionContextId} executionContextId
857 * @param {string} hash 848 * @param {string} hash
858 * @param {*=} executionContextAuxData 849 * @param {*=} executionContextAuxData
859 * @param {boolean=} isInternalScript 850 * @param {boolean=} isInternalScript
860 * @param {boolean=} isLiveEdit 851 * @param {boolean=} isLiveEdit
861 * @param {string=} sourceMapURL 852 * @param {string=} sourceMapURL
862 * @param {boolean=} hasSourceURL 853 * @param {boolean=} hasSourceURL
863 * @param {boolean=} deprecatedCommentWasUsed
864 */ 854 */
865 scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxData, isInternalScript, isLiveEdit, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed) 855 scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxData, isInternalScript, isLiveEdit, sourceMapURL, hasSourceURL)
866 { 856 {
867 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxDa ta, !!isInternalScript, !!isLiveEdit, sourceMapURL, hasSourceURL, deprecatedComm entWasUsed, false); 857 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxDa ta, !!isInternalScript, !!isLiveEdit, sourceMapURL, hasSourceURL, false);
868 }, 858 },
869 859
870 /** 860 /**
871 * @override 861 * @override
872 * @param {!RuntimeAgent.ScriptId} scriptId 862 * @param {!RuntimeAgent.ScriptId} scriptId
873 * @param {string} sourceURL 863 * @param {string} sourceURL
874 * @param {number} startLine 864 * @param {number} startLine
875 * @param {number} startColumn 865 * @param {number} startColumn
876 * @param {number} endLine 866 * @param {number} endLine
877 * @param {number} endColumn 867 * @param {number} endColumn
878 * @param {!RuntimeAgent.ExecutionContextId} executionContextId 868 * @param {!RuntimeAgent.ExecutionContextId} executionContextId
879 * @param {string} hash 869 * @param {string} hash
880 * @param {*=} executionContextAuxData 870 * @param {*=} executionContextAuxData
881 * @param {boolean=} isInternalScript 871 * @param {boolean=} isInternalScript
882 * @param {string=} sourceMapURL 872 * @param {string=} sourceMapURL
883 * @param {boolean=} hasSourceURL 873 * @param {boolean=} hasSourceURL
884 * @param {boolean=} deprecatedCommentWasUsed
885 */ 874 */
886 scriptFailedToParse: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, executionContextId, hash, executionContextAuxData, isInternal Script, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed) 875 scriptFailedToParse: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, executionContextId, hash, executionContextAuxData, isInternal Script, sourceMapURL, hasSourceURL)
887 { 876 {
888 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxDa ta, !!isInternalScript, false, sourceMapURL, hasSourceURL, deprecatedCommentWasU sed, true); 877 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxDa ta, !!isInternalScript, false, sourceMapURL, hasSourceURL, true);
889 }, 878 },
890 879
891 /** 880 /**
892 * @override 881 * @override
893 * @param {!DebuggerAgent.BreakpointId} breakpointId 882 * @param {!DebuggerAgent.BreakpointId} breakpointId
894 * @param {!DebuggerAgent.Location} location 883 * @param {!DebuggerAgent.Location} location
895 */ 884 */
896 breakpointResolved: function(breakpointId, location) 885 breakpointResolved: function(breakpointId, location)
897 { 886 {
898 this._debuggerModel._breakpointResolved(breakpointId, location); 887 this._debuggerModel._breakpointResolved(breakpointId, location);
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 /** 1280 /**
1292 * @param {?WebInspector.Target} target 1281 * @param {?WebInspector.Target} target
1293 * @return {?WebInspector.DebuggerModel} 1282 * @return {?WebInspector.DebuggerModel}
1294 */ 1283 */
1295 WebInspector.DebuggerModel.fromTarget = function(target) 1284 WebInspector.DebuggerModel.fromTarget = function(target)
1296 { 1285 {
1297 if (!target || !target.hasJSCapability()) 1286 if (!target || !target.hasJSCapability())
1298 return null; 1287 return null;
1299 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1288 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1300 } 1289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698