()
| 6391 | * shimmed functions as honorary native functions. |
| 6392 | */ |
| 6393 | const tameFunctionToString= ()=> { |
| 6394 | if( markVirtualizedNativeFunction=== undefined) { |
| 6395 | const virtualizedNativeFunctions= new WeakSet(); |
| 6396 | |
| 6397 | const tamingMethods= { |
| 6398 | toString() { |
| 6399 | const str= functionToString(this); |
| 6400 | if( |
| 6401 | stringEndsWith(str, nativeSuffix)|| |
| 6402 | !weaksetHas(virtualizedNativeFunctions, this)) |
| 6403 | { |
| 6404 | return str; |
| 6405 | } |
| 6406 | return `function ${this.name}() { [native code] }`; |
| 6407 | }}; |
| 6408 | |
| 6409 | |
| 6410 | defineProperty(functionPrototype, 'toString', { |
| 6411 | value: tamingMethods.toString}); |
| 6412 | |
| 6413 | |
| 6414 | markVirtualizedNativeFunction= freeze((func)=> |
| 6415 | weaksetAdd(virtualizedNativeFunctions, func)); |
| 6416 | |
| 6417 | } |
| 6418 | return markVirtualizedNativeFunction; |
| 6419 | };$h_once.tameFunctionToString(tameFunctionToString); |
| 6420 | })() |
| 6421 | , |
| 6422 | // === functors[32] === |
no test coverage detected