OLD | NEW |
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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 455 |
456 /** | 456 /** |
457 * @param {!RuntimeAgent.ScriptId} scriptId | 457 * @param {!RuntimeAgent.ScriptId} scriptId |
458 * @param {string} sourceURL | 458 * @param {string} sourceURL |
459 * @param {number} startLine | 459 * @param {number} startLine |
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 {boolean} isContentScript | 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 | 470 * @param {boolean=} deprecatedCommentWasUsed |
471 * @param {boolean=} hasSyntaxError | 471 * @param {boolean=} hasSyntaxError |
472 * @return {!WebInspector.Script} | 472 * @return {!WebInspector.Script} |
473 */ | 473 */ |
474 _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, e
ndLine, endColumn, executionContextId, hash, isContentScript, isInternalScript,
isLiveEdit, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed, hasSyntaxError
) | 474 _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, e
ndLine, endColumn, executionContextId, hash, executionContextAuxData, isInternal
Script, isLiveEdit, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed, hasSyn
taxError) |
475 { | 475 { |
| 476 var isContentScript = false; |
| 477 if (executionContextAuxData && ("isDefault" in executionContextAuxData)) |
| 478 isContentScript = !executionContextAuxData["isDefault"]; |
476 var script = new WebInspector.Script(this, scriptId, sourceURL, startLin
e, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, i
sInternalScript, isLiveEdit, sourceMapURL, hasSourceURL); | 479 var script = new WebInspector.Script(this, scriptId, sourceURL, startLin
e, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, i
sInternalScript, isLiveEdit, sourceMapURL, hasSourceURL); |
477 this._registerScript(script); | 480 this._registerScript(script); |
478 if (!hasSyntaxError) | 481 if (!hasSyntaxError) |
479 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Pars
edScriptSource, script); | 482 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Pars
edScriptSource, script); |
480 else | 483 else |
481 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Fail
edToParseScriptSource, script); | 484 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Fail
edToParseScriptSource, script); |
482 | 485 |
483 if (deprecatedCommentWasUsed) { | 486 if (deprecatedCommentWasUsed) { |
484 var text = WebInspector.UIString("'//@ sourceURL' and '//@ sourceMap
pingURL' are deprecated, please use '//# sourceURL=' and '//# sourceMappingURL='
instead."); | 487 var text = WebInspector.UIString("'//@ sourceURL' and '//@ sourceMap
pingURL' are deprecated, please use '//# sourceURL=' and '//# sourceMappingURL='
instead."); |
485 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); | 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); |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 /** | 848 /** |
846 * @override | 849 * @override |
847 * @param {!RuntimeAgent.ScriptId} scriptId | 850 * @param {!RuntimeAgent.ScriptId} scriptId |
848 * @param {string} sourceURL | 851 * @param {string} sourceURL |
849 * @param {number} startLine | 852 * @param {number} startLine |
850 * @param {number} startColumn | 853 * @param {number} startColumn |
851 * @param {number} endLine | 854 * @param {number} endLine |
852 * @param {number} endColumn | 855 * @param {number} endColumn |
853 * @param {!RuntimeAgent.ExecutionContextId} executionContextId | 856 * @param {!RuntimeAgent.ExecutionContextId} executionContextId |
854 * @param {string} hash | 857 * @param {string} hash |
855 * @param {boolean=} isContentScript | 858 * @param {*=} executionContextAuxData |
856 * @param {boolean=} isInternalScript | 859 * @param {boolean=} isInternalScript |
857 * @param {boolean=} isLiveEdit | 860 * @param {boolean=} isLiveEdit |
858 * @param {string=} sourceMapURL | 861 * @param {string=} sourceMapURL |
859 * @param {boolean=} hasSourceURL | 862 * @param {boolean=} hasSourceURL |
860 * @param {boolean=} deprecatedCommentWasUsed | 863 * @param {boolean=} deprecatedCommentWasUsed |
861 */ | 864 */ |
862 scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine,
endColumn, executionContextId, hash, isContentScript, isInternalScript, isLiveE
dit, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed) | 865 scriptParsed: function(scriptId, sourceURL, startLine, startColumn, endLine,
endColumn, executionContextId, hash, executionContextAuxData, isInternalScript,
isLiveEdit, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed) |
863 { | 866 { |
864 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine,
startColumn, endLine, endColumn, executionContextId, hash, !!isContentScript, !!
isInternalScript, !!isLiveEdit, sourceMapURL, hasSourceURL, deprecatedCommentWas
Used, false); | 867 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine,
startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxDa
ta, !!isInternalScript, !!isLiveEdit, sourceMapURL, hasSourceURL, deprecatedComm
entWasUsed, false); |
865 }, | 868 }, |
866 | 869 |
867 /** | 870 /** |
868 * @override | 871 * @override |
869 * @param {!RuntimeAgent.ScriptId} scriptId | 872 * @param {!RuntimeAgent.ScriptId} scriptId |
870 * @param {string} sourceURL | 873 * @param {string} sourceURL |
871 * @param {number} startLine | 874 * @param {number} startLine |
872 * @param {number} startColumn | 875 * @param {number} startColumn |
873 * @param {number} endLine | 876 * @param {number} endLine |
874 * @param {number} endColumn | 877 * @param {number} endColumn |
875 * @param {!RuntimeAgent.ExecutionContextId} executionContextId | 878 * @param {!RuntimeAgent.ExecutionContextId} executionContextId |
876 * @param {string} hash | 879 * @param {string} hash |
877 * @param {boolean=} isContentScript | 880 * @param {*=} executionContextAuxData |
878 * @param {boolean=} isInternalScript | 881 * @param {boolean=} isInternalScript |
879 * @param {string=} sourceMapURL | 882 * @param {string=} sourceMapURL |
880 * @param {boolean=} hasSourceURL | 883 * @param {boolean=} hasSourceURL |
881 * @param {boolean=} deprecatedCommentWasUsed | 884 * @param {boolean=} deprecatedCommentWasUsed |
882 */ | 885 */ |
883 scriptFailedToParse: function(scriptId, sourceURL, startLine, startColumn, e
ndLine, endColumn, executionContextId, hash, isContentScript, isInternalScript,
sourceMapURL, hasSourceURL, deprecatedCommentWasUsed) | 886 scriptFailedToParse: function(scriptId, sourceURL, startLine, startColumn, e
ndLine, endColumn, executionContextId, hash, executionContextAuxData, isInternal
Script, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed) |
884 { | 887 { |
885 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine,
startColumn, endLine, endColumn, executionContextId, hash, !!isContentScript, !!
isInternalScript, false, sourceMapURL, hasSourceURL, deprecatedCommentWasUsed, t
rue); | 888 this._debuggerModel._parsedScriptSource(scriptId, sourceURL, startLine,
startColumn, endLine, endColumn, executionContextId, hash, executionContextAuxDa
ta, !!isInternalScript, false, sourceMapURL, hasSourceURL, deprecatedCommentWasU
sed, true); |
886 }, | 889 }, |
887 | 890 |
888 /** | 891 /** |
889 * @override | 892 * @override |
890 * @param {!DebuggerAgent.BreakpointId} breakpointId | 893 * @param {!DebuggerAgent.BreakpointId} breakpointId |
891 * @param {!DebuggerAgent.Location} location | 894 * @param {!DebuggerAgent.Location} location |
892 */ | 895 */ |
893 breakpointResolved: function(breakpointId, location) | 896 breakpointResolved: function(breakpointId, location) |
894 { | 897 { |
895 this._debuggerModel._breakpointResolved(breakpointId, location); | 898 this._debuggerModel._breakpointResolved(breakpointId, location); |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 /** | 1291 /** |
1289 * @param {?WebInspector.Target} target | 1292 * @param {?WebInspector.Target} target |
1290 * @return {?WebInspector.DebuggerModel} | 1293 * @return {?WebInspector.DebuggerModel} |
1291 */ | 1294 */ |
1292 WebInspector.DebuggerModel.fromTarget = function(target) | 1295 WebInspector.DebuggerModel.fromTarget = function(target) |
1293 { | 1296 { |
1294 if (!target || !target.hasJSCapability()) | 1297 if (!target || !target.hasJSCapability()) |
1295 return null; | 1298 return null; |
1296 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); | 1299 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); |
1297 } | 1300 } |
OLD | NEW |