| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 }, | 92 }, |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * @param {!WebInspector.Script} script | 95 * @param {!WebInspector.Script} script |
| 96 */ | 96 */ |
| 97 addScript: function(script) | 97 addScript: function(script) |
| 98 { | 98 { |
| 99 | 99 |
| 100 var splitURL = WebInspector.ParsedURL.splitURLIntoPathComponents(script.
sourceURL); | 100 var splitURL = WebInspector.ParsedURL.splitURLIntoPathComponents(script.
sourceURL); |
| 101 var url = splitURL[splitURL.length - 1]; | 101 var url = splitURL[splitURL.length - 1]; |
| 102 url = "debugger:///VM" + script.scriptId + (url ? " " + url: ""); | 102 url = "debugger:///VM" + script.scriptId + (url ? " " + url : ""); |
| 103 | 103 |
| 104 var uiSourceCode = this._project.createUISourceCode(url, WebInspector.re
sourceTypes.Script); | 104 var uiSourceCode = this._project.createUISourceCode(url, WebInspector.re
sourceTypes.Script); |
| 105 uiSourceCode[WebInspector.DefaultScriptMapping._scriptSymbol] = script; | 105 uiSourceCode[WebInspector.DefaultScriptMapping._scriptSymbol] = script; |
| 106 this._uiSourceCodeForScriptId.set(script.scriptId, uiSourceCode); | 106 this._uiSourceCodeForScriptId.set(script.scriptId, uiSourceCode); |
| 107 this._scriptIdForUISourceCode.set(uiSourceCode, script.scriptId); | 107 this._scriptIdForUISourceCode.set(uiSourceCode, script.scriptId); |
| 108 this._project.addUISourceCodeWithProvider(uiSourceCode, script); | 108 this._project.addUISourceCodeWithProvider(uiSourceCode, script); |
| 109 | 109 |
| 110 this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel.targ
et(), uiSourceCode, this); | 110 this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel.targ
et(), uiSourceCode, this); |
| 111 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); | 111 this._debuggerWorkspaceBinding.pushSourceMapping(script, this); |
| 112 }, | 112 }, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 146 } |
| 147 | 147 |
| 148 /** | 148 /** |
| 149 * @param {!WebInspector.Target} target | 149 * @param {!WebInspector.Target} target |
| 150 * @return {string} | 150 * @return {string} |
| 151 */ | 151 */ |
| 152 WebInspector.DefaultScriptMapping.projectIdForTarget = function(target) | 152 WebInspector.DefaultScriptMapping.projectIdForTarget = function(target) |
| 153 { | 153 { |
| 154 return "debugger:" + target.id(); | 154 return "debugger:" + target.id(); |
| 155 } | 155 } |
| OLD | NEW |