From 98d19fa6244384f7e17998b5420d724481ed3835 Mon Sep 17 00:00:00 2001 From: dave caruso Date: Mon, 16 Oct 2023 21:22:43 -0700 Subject: fix(runtime): make some things more stable (partial jsc debug build) (#5881) * make our debug assertions work * install bun-webkit-debug * more progress * ok * progress... * more debug build stuff * ok * a * asdfghjkl * fix(runtime): fix bad assertion failure in JSBufferList * ok * stuff * upgrade webkit * Update src/bun.js/bindings/JSDOMWrapperCache.h Co-authored-by: Jarred Sumner * fix message for colin's changes * okay * fix cjs prototype * implement mainModule * i think this fixes it all --------- Co-authored-by: Jarred Sumner --- src/js/builtins/ConsoleObject.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/js/builtins/ConsoleObject.ts') diff --git a/src/js/builtins/ConsoleObject.ts b/src/js/builtins/ConsoleObject.ts index da316efdc..b48593154 100644 --- a/src/js/builtins/ConsoleObject.ts +++ b/src/js/builtins/ConsoleObject.ts @@ -116,7 +116,7 @@ export function write(this: Console, input) { const count = $argumentCount(); for (var i = 1; i < count; i++) { - wrote += writer.write($argument(i)); + wrote += writer.write(arguments[i]); } writer.flush(true); @@ -278,7 +278,7 @@ export function createConsoleConstructor(console: typeof globalThis.console) { }; const table = (head, columns) => { - const columnWidths = ArrayPrototypeMap.call(head, h => getStringWidth(h)) as number[]; + const columnWidths = ArrayPrototypeMap.$call(head, h => getStringWidth(h)) as number[]; const longestColumn = Math.max(...(ArrayPrototypeMap as any).$call(columns, a => a.length)); const rows: any = $newArrayWithSize(longestColumn); @@ -508,7 +508,7 @@ export function createConsoleConstructor(console: typeof globalThis.console) { const errorHandler = useStdout ? this._stdoutErrorHandler : this._stderrErrorHandler; if (groupIndent.length !== 0) { - if (StringPrototypeIncludes.call(string, "\n")) { + if (StringPrototypeIncludes.$call(string, "\n")) { // ?! string = (RegExpPrototypeSymbolReplace.$call as any)(/\n/g, string, `\n${groupIndent}`); } @@ -657,7 +657,7 @@ export function createConsoleConstructor(console: typeof globalThis.console) { if (!expression) { args[0] = `Assertion failed${args.length === 0 ? "" : `: ${args[0]}`}`; // The arguments will be formatted in warn() again - Reflect.apply(this.warn, this, args); + this.warn.$apply(this, args); } }, @@ -698,7 +698,7 @@ export function createConsoleConstructor(console: typeof globalThis.console) { group(...data) { if (data.length > 0) { - Reflect.apply(this.log, this, data); + this.log.$apply(this, data); } this[kGroupIndent] += StringPrototypeRepeat.$call(" ", this[kGroupIndentationWidth]); }, -- cgit v1.2.3