MCPcopy Create free account
hub / github.com/nodejs/node / replaceAndSkip

Function replaceAndSkip

deps/v8/tools/clusterfuzz/js_fuzzer/mutators/try_catch.js:125–135  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

123}
124
125function replaceAndSkip(path) {
126 if (!babelTypes.isLabeledStatement(path.parent) ||
127 !babelTypes.isLoop(path.node)) {
128 // Don't wrap loops with labels as it makes continue
129 // statements syntactically invalid. We wrap the label
130 // instead below.
131 path.replaceWith(wrapTryCatch(path.node));
132 }
133 // Prevent infinite looping.
134 path.skip();
135}
136
137function replaceBlockStatementAndSkip(path) {
138 path.replaceWith(wrapBlockWithTryCatch(path.node));

Callers 2

exitMethod · 0.85
enterMethod · 0.85

Calls 2

wrapTryCatchFunction · 0.85
skipMethod · 0.45

Tested by

no test coverage detected