mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 20:39:05 +00:00
safety: audit and add missing exception checks to JSC::constructArray+constructEmptyArray (#20119)
This commit is contained in:
@@ -1394,12 +1394,12 @@ pub const PostgresSQLConnection = struct {
|
||||
this.globalObject.bunVM().timer.insert(&this.timer);
|
||||
}
|
||||
|
||||
pub fn getQueries(_: *PostgresSQLConnection, thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject) JSC.JSValue {
|
||||
pub fn getQueries(_: *PostgresSQLConnection, thisValue: JSC.JSValue, globalObject: *JSC.JSGlobalObject) bun.JSError!JSC.JSValue {
|
||||
if (js.queriesGetCached(thisValue)) |value| {
|
||||
return value;
|
||||
}
|
||||
|
||||
const array = JSC.JSValue.createEmptyArray(globalObject, 0);
|
||||
const array = try JSC.JSValue.createEmptyArray(globalObject, 0);
|
||||
js.queriesSetCached(thisValue, globalObject, array);
|
||||
|
||||
return array;
|
||||
|
||||
Reference in New Issue
Block a user