mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 03:48:56 +00:00
fix worker.test.ts
This commit is contained in:
@@ -596,9 +596,8 @@ pub const JSGlobalObject = opaque {
|
||||
return @as(*jsc.VirtualMachine, @ptrCast(@alignCast(this.bunVMUnsafe())));
|
||||
}
|
||||
|
||||
extern fn JSC__JSGlobalObject__handleRejectedPromises(*JSGlobalObject) void;
|
||||
pub fn handleRejectedPromises(this: *JSGlobalObject) void {
|
||||
return bun.jsc.fromJSHostCallGeneric(this, @src(), JSC__JSGlobalObject__handleRejectedPromises, .{this}) catch @panic("unreachable");
|
||||
return bun.cpp.JSC__JSGlobalObject__handleRejectedPromises(this);
|
||||
}
|
||||
|
||||
extern fn ZigGlobalObject__readableStreamToArrayBuffer(*JSGlobalObject, JSValue) JSValue;
|
||||
|
||||
@@ -4059,7 +4059,10 @@ void GlobalObject::handleRejectedPromises()
|
||||
continue;
|
||||
|
||||
Bun__handleRejectedPromise(this, promise);
|
||||
if (auto ex = scope.exception()) this->reportUncaughtExceptionAtEventLoop(this, ex);
|
||||
if (auto ex = scope.exception()) {
|
||||
scope.clearException();
|
||||
this->reportUncaughtExceptionAtEventLoop(this, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3649,6 +3649,7 @@ JSC::EncodedJSValue JSC__JSGlobalObject__generateHeapSnapshot(JSC::JSGlobalObjec
|
||||
|
||||
JSC::VM* JSC__JSGlobalObject__vm(JSC::JSGlobalObject* arg0) { return &arg0->vm(); };
|
||||
|
||||
[[ZIG_EXPORT(nothrow)]]
|
||||
void JSC__JSGlobalObject__handleRejectedPromises(JSC::JSGlobalObject* arg0)
|
||||
{
|
||||
return jsCast<Zig::GlobalObject*>(arg0)->handleRejectedPromises();
|
||||
|
||||
Reference in New Issue
Block a user