OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 WebInspector.ResourceScriptMapping.prototype = { | 57 WebInspector.ResourceScriptMapping.prototype = { |
58 /** | 58 /** |
59 * @override | 59 * @override |
60 * @param {!WebInspector.DebuggerModel.Location} rawLocation | 60 * @param {!WebInspector.DebuggerModel.Location} rawLocation |
61 * @return {?WebInspector.UILocation} | 61 * @return {?WebInspector.UILocation} |
62 */ | 62 */ |
63 rawLocationToUILocation: function(rawLocation) | 63 rawLocationToUILocation: function(rawLocation) |
64 { | 64 { |
65 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat
ion} */ (rawLocation); | 65 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat
ion} */ (rawLocation); |
66 var script = debuggerModelLocation.script(); | 66 var script = debuggerModelLocation.script(); |
| 67 if (!script) |
| 68 return null; |
67 var uiSourceCode = this._workspaceUISourceCodeForScript(script); | 69 var uiSourceCode = this._workspaceUISourceCodeForScript(script); |
68 if (!uiSourceCode) | 70 if (!uiSourceCode) |
69 return null; | 71 return null; |
70 var scriptFile = this.scriptFile(uiSourceCode); | 72 var scriptFile = this.scriptFile(uiSourceCode); |
71 if (scriptFile && ((scriptFile.hasDivergedFromVM() && !scriptFile.isMerg
ingToVM()) || scriptFile.isDivergingFromVM())) | 73 if (scriptFile && ((scriptFile.hasDivergedFromVM() && !scriptFile.isMerg
ingToVM()) || scriptFile.isDivergingFromVM())) |
72 return null; | 74 return null; |
73 var lineNumber = debuggerModelLocation.lineNumber - (script.isInlineScri
ptWithSourceURL() ? script.lineOffset : 0); | 75 var lineNumber = debuggerModelLocation.lineNumber - (script.isInlineScri
ptWithSourceURL() ? script.lineOffset : 0); |
74 var columnNumber = debuggerModelLocation.columnNumber || 0; | 76 var columnNumber = debuggerModelLocation.columnNumber || 0; |
75 if (script.isInlineScriptWithSourceURL() && !lineNumber && columnNumber) | 77 if (script.isInlineScriptWithSourceURL() && !lineNumber && columnNumber) |
76 columnNumber -= script.columnOffset; | 78 columnNumber -= script.columnOffset; |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 /** | 481 /** |
480 * @return {boolean} | 482 * @return {boolean} |
481 */ | 483 */ |
482 hasSourceMapURL: function() | 484 hasSourceMapURL: function() |
483 { | 485 { |
484 return this._script && !!this._script.sourceMapURL; | 486 return this._script && !!this._script.sourceMapURL; |
485 }, | 487 }, |
486 | 488 |
487 __proto__: WebInspector.Object.prototype | 489 __proto__: WebInspector.Object.prototype |
488 } | 490 } |
OLD | NEW |