cpp: audit redundant and problematic uses of JSValue constructor (#20623)

This commit is contained in:
Meghan Denny
2025-06-24 19:58:44 -08:00
committed by GitHub
parent 61024b2b4a
commit 2072fa1d59
49 changed files with 266 additions and 304 deletions

View File

@@ -1519,7 +1519,7 @@ extern "C" JSC::EncodedJSValue Bun__wrapAbortError(JSC::JSGlobalObject* lexicalG
auto cause = JSC::JSValue::decode(causeParam);
if (cause.isUndefined()) {
return JSC::JSValue::encode(Bun::createError(vm, globalObject, Bun::ErrorCode::ABORT_ERR, JSC::JSValue(globalObject->commonStrings().OperationWasAbortedString(globalObject))));
return JSC::JSValue::encode(Bun::createError(vm, globalObject, Bun::ErrorCode::ABORT_ERR, globalObject->commonStrings().OperationWasAbortedString(globalObject)));
}
auto message = globalObject->commonStrings().OperationWasAbortedString(globalObject);