mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 04:49:06 +00:00
zig: prefer .jsUndefined() over .undefined for JSValue (#20332)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user