File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -408,12 +408,16 @@ function wrapCallSite(frame, state) {
408408 return frame ;
409409}
410410
411+ function emptyCache ( ) {
412+ fileContentsCache = { } ;
413+ sourceMapCache = { } ;
414+ }
415+
411416// This function is part of the V8 stack trace API, for more info see:
412417// https://v8.dev/docs/stack-trace-api
413418function prepareStackTrace ( error , stack ) {
414419 if ( emptyCacheBetweenOperations ) {
415- fileContentsCache = { } ;
416- sourceMapCache = { } ;
420+ emptyCache ( ) ;
417421 }
418422
419423 var name = error . name || 'Error' ;
@@ -503,6 +507,7 @@ exports.wrapCallSite = wrapCallSite;
503507exports . getErrorSource = getErrorSource ;
504508exports . mapSourcePosition = mapSourcePosition ;
505509exports . retrieveSourceMap = retrieveSourceMap ;
510+ exports . emptyCache = emptyCache ;
506511
507512exports . install = function ( options ) {
508513 options = options || { } ;
You can’t perform that action at this time.
0 commit comments