| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 uiSourceCode._evaluationIndex = evaluationIndex; | 182 uiSourceCode._evaluationIndex = evaluationIndex; |
| 183 var evaluationUrl = this._evaluationSourceURL(uiSourceCode); | 183 var evaluationUrl = this._evaluationSourceURL(uiSourceCode); |
| 184 | 184 |
| 185 var expression = uiSourceCode.workingCopy(); | 185 var expression = uiSourceCode.workingCopy(); |
| 186 | 186 |
| 187 // In order to stop on the breakpoints during the snippet evaluation we
need to compile and run it separately. | 187 // In order to stop on the breakpoints during the snippet evaluation we
need to compile and run it separately. |
| 188 // If separate compilation and execution is not supported by the port we
fall back to evaluation in console. | 188 // If separate compilation and execution is not supported by the port we
fall back to evaluation in console. |
| 189 // In case we don't need that since debugger is already paused. | 189 // In case we don't need that since debugger is already paused. |
| 190 // We do the same when we are stopped on the call frame since debugger
is already paused and can not stop on breakpoint anymore. | 190 // We do the same when we are stopped on the call frame since debugger
is already paused and can not stop on breakpoint anymore. |
| 191 if (WebInspector.debuggerModel.selectedCallFrame()) { | 191 if (WebInspector.debuggerModel.selectedCallFrame()) { |
| 192 expression = uiSourceCode.workingCopy() + "\n//@ sourceURL=" + evalu
ationUrl + "\n"; | 192 expression = uiSourceCode.workingCopy() + "\n//# sourceURL=" + evalu
ationUrl + "\n"; |
| 193 WebInspector.evaluateInConsole(expression, true); | 193 WebInspector.evaluateInConsole(expression, true); |
| 194 return; | 194 return; |
| 195 } | 195 } |
| 196 | 196 |
| 197 WebInspector.showConsole(); | 197 WebInspector.showConsole(); |
| 198 DebuggerAgent.compileScript(expression, evaluationUrl, compileCallback.b
ind(this)); | 198 DebuggerAgent.compileScript(expression, evaluationUrl, compileCallback.b
ind(this)); |
| 199 | 199 |
| 200 /** | 200 /** |
| 201 * @param {?string} error | 201 * @param {?string} error |
| 202 * @param {string=} scriptId | 202 * @param {string=} scriptId |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 this._model.renameScriptSnippet(path[0], newName, callback); | 638 this._model.renameScriptSnippet(path[0], newName, callback); |
| 639 }, | 639 }, |
| 640 | 640 |
| 641 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype | 641 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype |
| 642 } | 642 } |
| 643 | 643 |
| 644 /** | 644 /** |
| 645 * @type {?WebInspector.ScriptSnippetModel} | 645 * @type {?WebInspector.ScriptSnippetModel} |
| 646 */ | 646 */ |
| 647 WebInspector.scriptSnippetModel = null; | 647 WebInspector.scriptSnippetModel = null; |
| OLD | NEW |