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 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 for (var i = 0; i < callFrames.length; ++i) { | 1031 for (var i = 0; i < callFrames.length; ++i) { |
1032 var callFrame = callFrames[i]; | 1032 var callFrame = callFrames[i]; |
1033 var script = debuggerModel.scriptForId(callFrame.location.scriptId); | 1033 var script = debuggerModel.scriptForId(callFrame.location.scriptId); |
1034 if (script) | 1034 if (script) |
1035 result.push(new WebInspector.DebuggerModel.CallFrame(debuggerModel,
script, callFrame)); | 1035 result.push(new WebInspector.DebuggerModel.CallFrame(debuggerModel,
script, callFrame)); |
1036 } | 1036 } |
1037 return result; | 1037 return result; |
1038 } | 1038 } |
1039 | 1039 |
1040 WebInspector.DebuggerModel.CallFrame.prototype = { | 1040 WebInspector.DebuggerModel.CallFrame.prototype = { |
1041 | |
1042 /** | 1041 /** |
1043 * @return {!WebInspector.Script} | 1042 * @return {!WebInspector.Script} |
1044 */ | 1043 */ |
1045 get script() | 1044 get script() |
1046 { | 1045 { |
1047 return this._script; | 1046 return this._script; |
1048 }, | 1047 }, |
1049 | 1048 |
1050 /** | 1049 /** |
1051 * @return {string} | 1050 * @return {string} |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 this._payload = callFrame._payload.scopeChain[ordinal]; | 1198 this._payload = callFrame._payload.scopeChain[ordinal]; |
1200 this._type = this._payload.type; | 1199 this._type = this._payload.type; |
1201 this._name = this._payload.name; | 1200 this._name = this._payload.name; |
1202 this._ordinal = ordinal; | 1201 this._ordinal = ordinal; |
1203 this._startLocation = this._payload.startLocation ? WebInspector.DebuggerMod
el.Location.fromPayload(callFrame.debuggerModel, this._payload.startLocation) :
null; | 1202 this._startLocation = this._payload.startLocation ? WebInspector.DebuggerMod
el.Location.fromPayload(callFrame.debuggerModel, this._payload.startLocation) :
null; |
1204 this._endLocation = this._payload.endLocation ? WebInspector.DebuggerModel.L
ocation.fromPayload(callFrame.debuggerModel, this._payload.endLocation) : null; | 1203 this._endLocation = this._payload.endLocation ? WebInspector.DebuggerModel.L
ocation.fromPayload(callFrame.debuggerModel, this._payload.endLocation) : null; |
1205 } | 1204 } |
1206 | 1205 |
1207 WebInspector.DebuggerModel.Scope.prototype = { | 1206 WebInspector.DebuggerModel.Scope.prototype = { |
1208 /** | 1207 /** |
| 1208 * @return {!WebInspector.DebuggerModel.CallFrame} |
| 1209 */ |
| 1210 callFrame: function() |
| 1211 { |
| 1212 return this._callFrame; |
| 1213 }, |
| 1214 |
| 1215 /** |
1209 * @return {string} | 1216 * @return {string} |
1210 */ | 1217 */ |
1211 type: function() | 1218 type: function() |
1212 { | 1219 { |
1213 return this._type; | 1220 return this._type; |
1214 }, | 1221 }, |
1215 | 1222 |
1216 /** | 1223 /** |
1217 * @return {string|undefined} | 1224 * @return {string|undefined} |
1218 */ | 1225 */ |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 /** | 1324 /** |
1318 * @param {?WebInspector.Target} target | 1325 * @param {?WebInspector.Target} target |
1319 * @return {?WebInspector.DebuggerModel} | 1326 * @return {?WebInspector.DebuggerModel} |
1320 */ | 1327 */ |
1321 WebInspector.DebuggerModel.fromTarget = function(target) | 1328 WebInspector.DebuggerModel.fromTarget = function(target) |
1322 { | 1329 { |
1323 if (!target || !target.hasJSContext()) | 1330 if (!target || !target.hasJSContext()) |
1324 return null; | 1331 return null; |
1325 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); | 1332 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); |
1326 } | 1333 } |
OLD | NEW |