( node: IHeapNode, args: JSONifyArgs, options: JSONifyOptions, )
| 328 | } |
| 329 | |
| 330 | function JSONifyCode( |
| 331 | node: IHeapNode, |
| 332 | args: JSONifyArgs, |
| 333 | options: JSONifyOptions, |
| 334 | ): ISerializedInfo { |
| 335 | const info = Object.create(null); |
| 336 | |
| 337 | iterateSelectedEdges(node, (edge: IHeapEdge): Optional<{stop: boolean}> => { |
| 338 | if ( |
| 339 | edge.name_or_index === 'name_or_scope_info' && |
| 340 | edge.toNode.name === '(function scope info)' |
| 341 | ) { |
| 342 | const key = 'variables with non-number values in closure scope chain'; |
| 343 | info[key] = config.simplifyCodeSerialization |
| 344 | ? JSONifyNodeOneLevel(edge.toNode) |
| 345 | : JSONifyNode(edge.toNode, args, options); |
| 346 | } else if (edge.name_or_index === 'script_or_debug_info') { |
| 347 | info['script URL'] = edge.toNode.name; |
| 348 | } else { |
| 349 | const key = filterJSONPropName(edge.name_or_index); |
| 350 | info[key] = config.simplifyCodeSerialization |
| 351 | ? JSONifyNodeOneLevel(edge.toNode) |
| 352 | : JSONifyNode(edge.toNode, args, options); |
| 353 | } |
| 354 | return null; |
| 355 | }); |
| 356 | return info; |
| 357 | } |
| 358 | |
| 359 | function JSONifyContext( |
| 360 | node: IHeapNode, |
no test coverage detected
searching dependent graphs…