| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 name: script.nameOrSourceURL(), | 154 name: script.nameOrSourceURL(), |
| 155 source: script.source, | 155 source: script.source, |
| 156 startLine: script.line_offset, | 156 startLine: script.line_offset, |
| 157 startColumn: script.column_offset, | 157 startColumn: script.column_offset, |
| 158 endLine: endLine, | 158 endLine: endLine, |
| 159 endColumn: endColumn, | 159 endColumn: endColumn, |
| 160 isContentScript: !!script.context_data && script.context_data.indexOf("i
njected") == 0 | 160 isContentScript: !!script.context_data && script.context_data.indexOf("i
njected") == 0 |
| 161 }; | 161 }; |
| 162 } | 162 } |
| 163 | 163 |
| 164 DebuggerScript.setBreakpoint = function(execState, args) | 164 DebuggerScript.setBreakpoint = function(execState, info) |
| 165 { | 165 { |
| 166 var positionAlignment = args.interstatementLocation ? Debug.BreakPositionAli
gnment.BreakPosition : Debug.BreakPositionAlignment.Statement; | 166 var positionAlignment = info.interstatementLocation ? Debug.BreakPositionAli
gnment.BreakPosition : Debug.BreakPositionAlignment.Statement; |
| 167 var breakId = Debug.setScriptBreakPointById(args.sourceID, args.lineNumber,
args.columnNumber, args.condition, undefined, positionAlignment); | 167 var breakId = Debug.setScriptBreakPointById(info.sourceID, info.lineNumber,
info.columnNumber, info.condition, undefined, positionAlignment); |
| 168 | 168 |
| 169 var locations = Debug.findBreakPointActualLocations(breakId); | 169 var locations = Debug.findBreakPointActualLocations(breakId); |
| 170 if (!locations.length) | 170 if (!locations.length) |
| 171 return undefined; | 171 return undefined; |
| 172 args.lineNumber = locations[0].line; | 172 info.lineNumber = locations[0].line; |
| 173 args.columnNumber = locations[0].column; | 173 info.columnNumber = locations[0].column; |
| 174 return breakId.toString(); | 174 return breakId.toString(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 DebuggerScript.removeBreakpoint = function(execState, args) | 177 DebuggerScript.removeBreakpoint = function(execState, info) |
| 178 { | 178 { |
| 179 Debug.findBreakPoint(args.breakpointId, true); | 179 Debug.findBreakPoint(info.breakpointId, true); |
| 180 } | 180 } |
| 181 | 181 |
| 182 DebuggerScript.pauseOnExceptionsState = function() | 182 DebuggerScript.pauseOnExceptionsState = function() |
| 183 { | 183 { |
| 184 return DebuggerScript._pauseOnExceptionsState; | 184 return DebuggerScript._pauseOnExceptionsState; |
| 185 } | 185 } |
| 186 | 186 |
| 187 DebuggerScript.setPauseOnExceptionsState = function(newState) | 187 DebuggerScript.setPauseOnExceptionsState = function(newState) |
| 188 { | 188 { |
| 189 DebuggerScript._pauseOnExceptionsState = newState; | 189 DebuggerScript._pauseOnExceptionsState = newState; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 var details = e.details; | 255 var details = e.details; |
| 256 if (details.type === "liveedit_compile_error") { | 256 if (details.type === "liveedit_compile_error") { |
| 257 var startPosition = details.position.start; | 257 var startPosition = details.position.start; |
| 258 return [1, String(e), String(details.syntaxErrorMessage), Number
(startPosition.line), Number(startPosition.column)]; | 258 return [1, String(e), String(details.syntaxErrorMessage), Number
(startPosition.line), Number(startPosition.column)]; |
| 259 } | 259 } |
| 260 } | 260 } |
| 261 throw e; | 261 throw e; |
| 262 } | 262 } |
| 263 } | 263 } |
| 264 | 264 |
| 265 DebuggerScript.clearBreakpoints = function(execState, args) | 265 DebuggerScript.clearBreakpoints = function(execState, info) |
| 266 { | 266 { |
| 267 Debug.clearAllBreakPoints(); | 267 Debug.clearAllBreakPoints(); |
| 268 } | 268 } |
| 269 | 269 |
| 270 DebuggerScript.setBreakpointsActivated = function(execState, args) | 270 DebuggerScript.setBreakpointsActivated = function(execState, info) |
| 271 { | 271 { |
| 272 Debug.debuggerFlags().breakPointsActive.setValue(args.enabled); | 272 Debug.debuggerFlags().breakPointsActive.setValue(info.enabled); |
| 273 } | 273 } |
| 274 | 274 |
| 275 DebuggerScript.getScriptSource = function(eventData) | 275 DebuggerScript.getScriptSource = function(eventData) |
| 276 { | 276 { |
| 277 return eventData.script().source(); | 277 return eventData.script().source(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 DebuggerScript.setScriptSource = function(eventData, source) | 280 DebuggerScript.setScriptSource = function(eventData, source) |
| 281 { | 281 { |
| 282 if (eventData.script().data() === "injected-script") | 282 if (eventData.script().data() === "injected-script") |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 break; | 427 break; |
| 428 case ScopeType.Block: | 428 case ScopeType.Block: |
| 429 // Unsupported yet. Mustn't be reachable. | 429 // Unsupported yet. Mustn't be reachable. |
| 430 break; | 430 break; |
| 431 } | 431 } |
| 432 return scopeObject; | 432 return scopeObject; |
| 433 } | 433 } |
| 434 | 434 |
| 435 return DebuggerScript; | 435 return DebuggerScript; |
| 436 })(); | 436 })(); |
| OLD | NEW |