Chromium Code Reviews| 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 467 * @param {string=} sourceMapURL | 467 * @param {string=} sourceMapURL |
| 468 * @param {boolean=} hasSourceURL | 468 * @param {boolean=} hasSourceURL |
| 469 * @param {boolean=} hasSyntaxError | 469 * @param {boolean=} hasSyntaxError |
| 470 * @return {!WebInspector.Script} | 470 * @return {!WebInspector.Script} |
| 471 */ | 471 */ |
| 472 _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, executionContextId, hash, executionContextAuxData, isLiveEdit , sourceMapURL, hasSourceURL, hasSyntaxError) | 472 _parsedScriptSource: function(scriptId, sourceURL, startLine, startColumn, e ndLine, endColumn, executionContextId, hash, executionContextAuxData, isLiveEdit , sourceMapURL, hasSourceURL, hasSyntaxError) |
| 473 { | 473 { |
| 474 var isContentScript = false; | 474 var isContentScript = false; |
| 475 if (executionContextAuxData && ("isDefault" in executionContextAuxData)) | 475 if (executionContextAuxData && ("isDefault" in executionContextAuxData)) |
| 476 isContentScript = !executionContextAuxData["isDefault"]; | 476 isContentScript = !executionContextAuxData["isDefault"]; |
| 477 // Support file URL for node.js. | |
| 478 if (Runtime.queryParam("v8only") && sourceURL && sourceURL.startsWith("/ ")) | |
|
pfeldman
2016/10/15 00:42:35
- In case when Node target is attached from within
lushnikov
2016/10/15 00:59:03
Handled (1) via the Target.isNodeJS()
We're in a
| |
| 479 sourceURL = "file://" + sourceURL; | |
| 477 var script = new WebInspector.Script(this, scriptId, sourceURL, startLin e, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, i sLiveEdit, sourceMapURL, hasSourceURL); | 480 var script = new WebInspector.Script(this, scriptId, sourceURL, startLin e, startColumn, endLine, endColumn, executionContextId, hash, isContentScript, i sLiveEdit, sourceMapURL, hasSourceURL); |
| 478 this._registerScript(script); | 481 this._registerScript(script); |
| 479 if (!hasSyntaxError) | 482 if (!hasSyntaxError) |
| 480 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Pars edScriptSource, script); | 483 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Pars edScriptSource, script); |
| 481 else | 484 else |
| 482 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Fail edToParseScriptSource, script); | 485 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Fail edToParseScriptSource, script); |
| 483 return script; | 486 return script; |
| 484 }, | 487 }, |
| 485 | 488 |
| 486 /** | 489 /** |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1270 /** | 1273 /** |
| 1271 * @param {?WebInspector.Target} target | 1274 * @param {?WebInspector.Target} target |
| 1272 * @return {?WebInspector.DebuggerModel} | 1275 * @return {?WebInspector.DebuggerModel} |
| 1273 */ | 1276 */ |
| 1274 WebInspector.DebuggerModel.fromTarget = function(target) | 1277 WebInspector.DebuggerModel.fromTarget = function(target) |
| 1275 { | 1278 { |
| 1276 if (!target || !target.hasJSCapability()) | 1279 if (!target || !target.hasJSCapability()) |
| 1277 return null; | 1280 return null; |
| 1278 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); | 1281 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); |
| 1279 } | 1282 } |
| OLD | NEW |