diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-07-11 12:38:15 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 22:38:15 -0400 |
commit | 40d081d3d9f64bcd2524da86fb78808ac1d7b888 (patch) | |
tree | 2232fda10c06d80d749f975b691974c506caa63d /cli/js/web/streams/internals.ts | |
parent | d01eb6d9c506eef765fde8e40f9b90619b2ec83c (diff) |
feat: add performance user timing APIs (#6421)
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. */ |