| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 var scripts = Debug.scripts(); | 148 var scripts = Debug.scripts(); |
| 149 var contextDataPrefix = null; | 149 var contextDataPrefix = null; |
| 150 if (contextGroupId) | 150 if (contextGroupId) |
| 151 contextDataPrefix = contextGroupId + ","; | 151 contextDataPrefix = contextGroupId + ","; |
| 152 for (var i = 0; i < scripts.length; ++i) { | 152 for (var i = 0; i < scripts.length; ++i) { |
| 153 var script = scripts[i]; | 153 var script = scripts[i]; |
| 154 if (contextDataPrefix) { | 154 if (contextDataPrefix) { |
| 155 if (!script.context_data) | 155 if (!script.context_data) |
| 156 continue; | 156 continue; |
| 157 // Context data is a string in the following format: | 157 // Context data is a string in the following format: |
| 158 // <id>,<contextId>,("page"|"injected"|"worker") | 158 // <contextGroupId>,<contextId>,("default"|"nondefault") |
| 159 if (script.context_data.indexOf(contextDataPrefix) !== 0) | 159 if (script.context_data.indexOf(contextDataPrefix) !== 0) |
| 160 continue; | 160 continue; |
| 161 } | 161 } |
| 162 result.push(DebuggerScript._formatScript(script)); | 162 result.push(DebuggerScript._formatScript(script)); |
| 163 } | 163 } |
| 164 return result; | 164 return result; |
| 165 } | 165 } |
| 166 | 166 |
| 167 /** | 167 /** |
| 168 * @param {!Script} script | 168 * @param {!Script} script |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 id: script.id, | 207 id: script.id, |
| 208 name: script.nameOrSourceURL(), | 208 name: script.nameOrSourceURL(), |
| 209 sourceURL: script.source_url, | 209 sourceURL: script.source_url, |
| 210 sourceMappingURL: script.source_mapping_url, | 210 sourceMappingURL: script.source_mapping_url, |
| 211 source: script.source, | 211 source: script.source, |
| 212 startLine: script.line_offset, | 212 startLine: script.line_offset, |
| 213 startColumn: script.column_offset, | 213 startColumn: script.column_offset, |
| 214 endLine: endLine, | 214 endLine: endLine, |
| 215 endColumn: endColumn, | 215 endColumn: endColumn, |
| 216 executionContextId: executionContextId(), | 216 executionContextId: executionContextId(), |
| 217 isContentScript: !!script.context_data && script.context_data.endsWith("
,injected"), | 217 isContentScript: !!script.context_data && script.context_data.endsWith("
,nondefault"), |
| 218 isInternalScript: script.is_debugger_script | 218 isInternalScript: script.is_debugger_script |
| 219 }; | 219 }; |
| 220 } | 220 } |
| 221 | 221 |
| 222 /** | 222 /** |
| 223 * @param {!ExecutionState} execState | 223 * @param {!ExecutionState} execState |
| 224 * @param {!BreakpointInfo} info | 224 * @param {!BreakpointInfo} info |
| 225 * @return {string|undefined} | 225 * @return {string|undefined} |
| 226 */ | 226 */ |
| 227 DebuggerScript.setBreakpoint = function(execState, info) | 227 DebuggerScript.setBreakpoint = function(execState, info) |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 break; | 681 break; |
| 682 } | 682 } |
| 683 return result; | 683 return result; |
| 684 } | 684 } |
| 685 | 685 |
| 686 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. | 686 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. |
| 687 ToggleMirrorCache(false); | 687 ToggleMirrorCache(false); |
| 688 | 688 |
| 689 return DebuggerScript; | 689 return DebuggerScript; |
| 690 })(); | 690 })(); |
| OLD | NEW |