zig: prefer .jsUndefined() over .undefined for JSValue (#20332)

This commit is contained in:
Meghan Denny
2025-06-12 12:18:46 -08:00
committed by GitHub
parent d6590c4bfa
commit dedd433cbf
84 changed files with 569 additions and 574 deletions

View File

@@ -309,7 +309,7 @@ pub const StatWatcher = struct {
if (obj.js_this != .zero) {
return obj.js_this;
}
return .undefined;
return .jsUndefined();
}
};
@@ -318,7 +318,7 @@ pub const StatWatcher = struct {
this.persistent = true;
this.poll_ref.ref(this.ctx);
}
return .undefined;
return .jsUndefined();
}
pub fn doUnref(this: *StatWatcher, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) bun.JSError!JSC.JSValue {
@@ -326,7 +326,7 @@ pub const StatWatcher = struct {
this.persistent = false;
this.poll_ref.unref(this.ctx);
}
return .undefined;
return .jsUndefined();
}
/// Stops file watching but does not free the instance.
@@ -341,7 +341,7 @@ pub const StatWatcher = struct {
pub fn doClose(this: *StatWatcher, _: *JSC.JSGlobalObject, _: *JSC.CallFrame) bun.JSError!JSC.JSValue {
this.close();
return .undefined;
return .jsUndefined();
}
/// If the scheduler is not using this, free instantly, otherwise mark for being freed.
@@ -408,7 +408,7 @@ pub const StatWatcher = struct {
_ = js.listenerGetCached(this.js_this).?.call(
this.globalThis,
.undefined,
.jsUndefined(),
&[2]JSC.JSValue{
jsvalue,
jsvalue,
@@ -444,7 +444,7 @@ pub const StatWatcher = struct {
_ = js.listenerGetCached(this.js_this).?.call(
this.globalThis,
.undefined,
.jsUndefined(),
&[2]JSC.JSValue{
current_jsvalue,
prev_jsvalue,