| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 | 46 |
| 47 WebInspector.ResourceScriptMapping.prototype = { | 47 WebInspector.ResourceScriptMapping.prototype = { |
| 48 /** | 48 /** |
| 49 * @param {!WebInspector.RawLocation} rawLocation | 49 * @param {!WebInspector.RawLocation} rawLocation |
| 50 * @return {?WebInspector.UILocation} | 50 * @return {?WebInspector.UILocation} |
| 51 */ | 51 */ |
| 52 rawLocationToUILocation: function(rawLocation) | 52 rawLocationToUILocation: function(rawLocation) |
| 53 { | 53 { |
| 54 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat
ion} */ (rawLocation); | 54 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat
ion} */ (rawLocation); |
| 55 var script = this._debuggerModel.scriptForId(debuggerModelLocation.scrip
tId); | 55 var script = debuggerModelLocation.script(); |
| 56 var uiSourceCode = this._workspaceUISourceCodeForScript(script); | 56 var uiSourceCode = this._workspaceUISourceCodeForScript(script); |
| 57 if (!uiSourceCode) | 57 if (!uiSourceCode) |
| 58 return null; | 58 return null; |
| 59 var scriptFile = uiSourceCode.scriptFile(); | 59 var scriptFile = uiSourceCode.scriptFile(); |
| 60 if (scriptFile && ((scriptFile.hasDivergedFromVM() && !scriptFile.isMerg
ingToVM()) || scriptFile.isDivergingFromVM())) | 60 if (scriptFile && ((scriptFile.hasDivergedFromVM() && !scriptFile.isMerg
ingToVM()) || scriptFile.isDivergingFromVM())) |
| 61 return null; | 61 return null; |
| 62 return new WebInspector.UILocation(uiSourceCode, debuggerModelLocation.l
ineNumber, debuggerModelLocation.columnNumber || 0); | 62 return new WebInspector.UILocation(uiSourceCode, debuggerModelLocation.l
ineNumber, debuggerModelLocation.columnNumber || 0); |
| 63 }, | 63 }, |
| 64 | 64 |
| 65 /** | 65 /** |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 }, | 375 }, |
| 376 | 376 |
| 377 dispose: function() | 377 dispose: function() |
| 378 { | 378 { |
| 379 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyCommitted, this._workingCopyCommitted, this); | 379 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyCommitted, this._workingCopyCommitted, this); |
| 380 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyChanged, this._workingCopyChanged, this); | 380 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.
WorkingCopyChanged, this._workingCopyChanged, this); |
| 381 }, | 381 }, |
| 382 | 382 |
| 383 __proto__: WebInspector.Object.prototype | 383 __proto__: WebInspector.Object.prototype |
| 384 } | 384 } |
| OLD | NEW |