(
object: RemoteObject,
params?: Dap.VariablesParams,
)
| 447 | } |
| 448 | |
| 449 | private async _getArraySlots( |
| 450 | object: RemoteObject, |
| 451 | params?: Dap.VariablesParams, |
| 452 | ): Promise<Dap.Variable[]> { |
| 453 | const start = params && typeof params.start !== 'undefined' ? params.start : -1; |
| 454 | const count = params && typeof params.count !== 'undefined' ? params.count : -1; |
| 455 | let objectId: string; |
| 456 | try { |
| 457 | const response = await getArraySlots({ |
| 458 | cdp: object.cdp, |
| 459 | generatePreview: false, |
| 460 | args: [start, count], |
| 461 | objectId: object.objectId, |
| 462 | }); |
| 463 | |
| 464 | objectId = response.objectId; |
| 465 | } catch (e) { |
| 466 | return []; |
| 467 | } |
| 468 | |
| 469 | const result = (await this._getObjectProperties(object, objectId)).filter( |
| 470 | p => p.name !== '__proto__', |
| 471 | ); |
| 472 | await this._cdp.Runtime.releaseObject({ objectId }); |
| 473 | return result; |
| 474 | } |
| 475 | |
| 476 | private _createVariableReference(object: RemoteObject): number { |
| 477 | const reference = ++VariableStore._lastVariableReference; |
no test coverage detected