mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 13:51:47 +00:00
Lots of stuff (#7027)
* Use debug mode by default * Enable build with assertions enabled * Update cli.zig * Update bun-linux-build.yml * Fixes * Fix `ASSERT_ENABLED` * try this * Update Dockerfile * mimalloc debug * Update CMakeLists.txt * `Bun.deepMatch` - fix assertion failures cc @dylan-conway, looks like we need to use `putDirectMayBeIndex` and check for `isCell` more carefully. * Object.create support in code generator and callbacks wrapper * Remove unused file * zig upgrade * zls * Fix various errors * Support `BuiltinAccessor` in create_hash_table script * Fix assertion failure in `process.mainModule` * Fix assertion failure in `onerror` * Fix assertion failure when creating a Worker * Fix asssertion failure when loading lots of files in bun test * Fix assertion failure when termating a `Worker` * Add helper for converting BunString to a WTFString * Fix assertion failure in notifyNeedTermination * Add more debug logs in `bun test` * Fix compiler warning in usockets * Fix assertion failure with `Worker` termination (another) * Fix assertion failure in `coerceToInt64` * Fix assertion failure in `BroadcastChannel` * Fix assertion failure in `Headers.prototype.getAll` * Fixes #7067 * Add heap analyzer label for CommonJS modules * Fix assertion failure in module.require && module.require.resolve * Remove unused code * Fix assertion failure in debugger * Fix crash in debugger * Fix assertion failures in bun:sqlite * Bump zig * Bump WebKit * Fix assertion failure in JSPromise::reject && JSInternalPromise::reject * Fix assertion failure in ReadableStream::cancel * Fix assertion failure in AsyncContextFrame::create * Fix assertion failure in bun:sqlite * Fix assertion failure in mocks * Fix assertion failure in ServerWebSocket.close * Fix assertion failure in N-API with subclasses * [napi] Make promises cheaper * undo * Don't check for exceptions in ObjectInitializationScope * Add separate entry point for test runner that doesn't generate code * Don't deref builtin code * Fix preload test * Fix assertion failure in memoryUsage() * Fix preload test, part 2 * Ensure that the env map for a Worker is empty after it is used * The pointer for the Arena allocator used in parsing should not change * Terminate thread on exit * Start to implement scriptExecutionStatus * Update worker.test.ts * Fix Dirent.name setter * Update settings.json * Fix assertion failure in node:http * Use correct value for `JSFinalObject::maxInlineCapacity` * JSFinalObject::maxInlineCapacity x2 * Don't strip when assertions are enabled * Make `m_wasTerminated` atomic * Preserve directives in the transpiler cc @ctjlewis * Workaround assertion failure in ServerWebSocket.sendBinary and ServerWebSocket.sendText * windows * Buffer lockfile serialization in-memory * PR feedback * PR feedback * PR feedback * Windows * quotes * Update CMakeLists.txt * Update bun-linux-build.yml * Update bun-linux-build.yml * Move this code to BunString.cpp * Update BunString.cpp --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
@@ -175,6 +175,27 @@ void ReadableStream::cancel(const Exception& exception)
|
||||
invokeReadableStreamFunction(lexicalGlobalObject, privateName, JSC::jsUndefined(), arguments);
|
||||
}
|
||||
|
||||
void ReadableStream::cancel(WebCore::JSDOMGlobalObject& globalObject, JSReadableStream* readableStream, const Exception& exception)
|
||||
{
|
||||
auto* clientData = static_cast<JSVMClientData*>(globalObject.vm().clientData);
|
||||
auto& privateName = clientData->builtinFunctions().readableStreamInternalsBuiltins().readableStreamCancelPrivateName();
|
||||
|
||||
auto& vm = globalObject.vm();
|
||||
JSC::JSLockHolder lock(vm);
|
||||
auto scope = DECLARE_CATCH_SCOPE(vm);
|
||||
auto value = createDOMException(&globalObject, exception.code(), exception.message());
|
||||
if (UNLIKELY(scope.exception())) {
|
||||
ASSERT(vm.hasPendingTerminationException());
|
||||
return;
|
||||
}
|
||||
|
||||
MarkedArgumentBuffer arguments;
|
||||
arguments.append(readableStream);
|
||||
arguments.append(value);
|
||||
ASSERT(!arguments.hasOverflowed());
|
||||
invokeReadableStreamFunction(globalObject, privateName, JSC::jsUndefined(), arguments);
|
||||
}
|
||||
|
||||
static inline bool checkReadableStream(JSDOMGlobalObject& globalObject, JSReadableStream* readableStream, JSC::JSValue function)
|
||||
{
|
||||
auto& lexicalGlobalObject = globalObject;
|
||||
|
||||
Reference in New Issue
Block a user