aboutsummaryrefslogtreecommitdiff
path: root/src/js/internal/util/inspect.js
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/internal/util/inspect.js
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/internal/util/inspect.js')
-rw-r--r--src/js/internal/util/inspect.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/js/internal/util/inspect.js b/src/js/internal/util/inspect.js
index 655852168..5342ef3e7 100644
--- a/src/js/internal/util/inspect.js
+++ b/src/js/internal/util/inspect.js
@@ -56,7 +56,6 @@ const {
ErrorCaptureStackTrace,
ErrorPrototypeToString,
FunctionPrototypeBind,
- FunctionPrototypeCall,
FunctionPrototypeToString,
JSONStringify,
MapPrototypeGetSize,
@@ -160,7 +159,7 @@ function checkBox(ctor) {
return val => {
if (!vmSafeInstanceof(val, ctor)) return false;
try {
- ctor.prototype.valueOf.call(val);
+ ctor.prototype.valueOf.$call(val);
} catch {
return false;
}
@@ -1155,7 +1154,7 @@ function formatValue(ctx, value, recurseTimes, typedArray) {
// a counter internally.
const depth = ctx.depth === null ? null : ctx.depth - recurseTimes;
const isCrossContext = proxy !== undefined || !(context instanceof Object);
- const ret = FunctionPrototypeCall(maybeCustom, context, depth, getUserOptions(ctx, isCrossContext), inspect);
+ const ret = maybeCustom.$call(context, depth, getUserOptions(ctx, isCrossContext), inspect);
// If the custom inspection method returned `this`, don't go into infinite recursion.
if (ret !== context) {
if (typeof ret !== "string") return formatValue(ctx, ret, recurseTimes);
@@ -2255,7 +2254,7 @@ function formatProperty(ctx, value, recurseTimes, key, type, desc, original = va
(ctx.getters === "set" && desc.set !== undefined))
) {
try {
- const tmp = FunctionPrototypeCall(desc.get, original);
+ const tmp = desc.get.$call(original);
ctx.indentationLvl += 2;
if (tmp === null) {
str = `${s(`[${label}:`, sp)} ${s("null", "null")}${s("]", sp)}`;