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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 }; | 222 }; |
223 } | 223 } |
224 | 224 |
225 /** | 225 /** |
226 * @param {!ExecutionState} execState | 226 * @param {!ExecutionState} execState |
227 * @param {!BreakpointInfo} info | 227 * @param {!BreakpointInfo} info |
228 * @return {string|undefined} | 228 * @return {string|undefined} |
229 */ | 229 */ |
230 DebuggerScript.setBreakpoint = function(execState, info) | 230 DebuggerScript.setBreakpoint = function(execState, info) |
231 { | 231 { |
232 var positionAlignment = info.interstatementLocation ? Debug.BreakPositionAli
gnment.BreakPosition : Debug.BreakPositionAlignment.Statement; | 232 var breakId = Debug.setScriptBreakPointById(info.sourceID, info.lineNumber,
info.columnNumber, info.condition, undefined, Debug.BreakPositionAlignment.State
ment); |
233 var breakId = Debug.setScriptBreakPointById(info.sourceID, info.lineNumber,
info.columnNumber, info.condition, undefined, positionAlignment); | |
234 | |
235 var locations = Debug.findBreakPointActualLocations(breakId); | 233 var locations = Debug.findBreakPointActualLocations(breakId); |
236 if (!locations.length) | 234 if (!locations.length) |
237 return undefined; | 235 return undefined; |
238 info.lineNumber = locations[0].line; | 236 info.lineNumber = locations[0].line; |
239 info.columnNumber = locations[0].column; | 237 info.columnNumber = locations[0].column; |
240 return breakId.toString(); | 238 return breakId.toString(); |
241 } | 239 } |
242 | 240 |
243 /** | 241 /** |
244 * @param {!ExecutionState} execState | 242 * @param {!ExecutionState} execState |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 break; | 698 break; |
701 } | 699 } |
702 return result; | 700 return result; |
703 } | 701 } |
704 | 702 |
705 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. | 703 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. |
706 ToggleMirrorCache(false); | 704 ToggleMirrorCache(false); |
707 | 705 |
708 return DebuggerScript; | 706 return DebuggerScript; |
709 })(); | 707 })(); |
OLD | NEW |