aboutsummaryrefslogtreecommitdiff
path: root/src/js/builtins/ConsoleObject.ts
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-10-16 21:22:43 -0700
committerGravatar GitHub <noreply@github.com> 2023-10-16 21:22:43 -0700
commit98d19fa6244384f7e17998b5420d724481ed3835 (patch)
tree3061ccab41196daf4194ecc385961b121f2ec06d /src/js/builtins/ConsoleObject.ts
parenta3958190e8f106adca7fbf4ba2605056cb22aced (diff)
downloadbun-98d19fa6244384f7e17998b5420d724481ed3835.tar.gz
bun-98d19fa6244384f7e17998b5420d724481ed3835.tar.zst
bun-98d19fa6244384f7e17998b5420d724481ed3835.zip
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 <jarred@jarredsumner.com> * fix message for colin's changes * okay * fix cjs prototype * implement mainModule * i think this fixes it all --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Diffstat (limited to 'src/js/builtins/ConsoleObject.ts')
-rw-r--r--src/js/builtins/ConsoleObject.ts10
1 files changed, 5 insertions, 5 deletions
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]);
},