| 7397 | // but instead calls the real one, if no other cutoff is provided, |
| 7398 | // we cut this one off. |
| 7399 | captureStackTrace(error, optFn= tamedMethods.captureStackTrace) { |
| 7400 | if( typeof originalCaptureStackTrace=== 'function') { |
| 7401 | // OriginalError.captureStackTrace is only on v8 |
| 7402 | apply(originalCaptureStackTrace, OriginalError, [error, optFn]); |
| 7403 | return; |
| 7404 | } |
| 7405 | reflectSet(error, 'stack', ''); |
| 7406 | }, |
| 7407 | // Shim of proposed special power, to reside by default only |
| 7408 | // in the start compartment, for getting the stack traceback |
| 7409 | // string associated with an error. |