diff options
Diffstat (limited to 'cli/js/web/streams/internals.ts')
-rw-r--r-- | cli/js/web/streams/internals.ts | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/cli/js/web/streams/internals.ts b/cli/js/web/streams/internals.ts index f6b20ccaf..58a62e3cb 100644 --- a/cli/js/web/streams/internals.ts +++ b/cli/js/web/streams/internals.ts @@ -19,7 +19,7 @@ import { WritableStreamDefaultWriterImpl } from "./writable_stream_default_write import { WritableStreamImpl } from "./writable_stream.ts"; import { AbortSignalImpl } from "../abort_signal.ts"; import { DOMExceptionImpl as DOMException } from "../dom_exception.ts"; -import { cloneValue } from "../util.ts"; +import { cloneValue, setFunctionName } from "../util.ts"; import { assert, AssertionError } from "../../util.ts"; export type AbortAlgorithm = (reason?: any) => PromiseLike<void>; @@ -1320,12 +1320,6 @@ export function resetQueue<R>(container: Container<R>): void { container[sym.queueTotalSize] = 0; } -/** An internal function which provides a function name for some generated - * functions, so stack traces are a bit more readable. */ -export function setFunctionName(fn: Function, value: string): void { - Object.defineProperty(fn, "name", { value, configurable: true }); -} - /** An internal function which mimics the behavior of setting the promise to * handled in JavaScript. In this situation, an assertion failure, which * shouldn't happen will get thrown, instead of swallowed. */ |