From c7339fdc7161da8a98abc1451f533bcc72a29b61 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 11 Sep 2025 12:50:26 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- src/bun.js/bindings/CallSitePrototype.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bun.js/bindings/CallSitePrototype.cpp b/src/bun.js/bindings/CallSitePrototype.cpp index 93bc98762f..79b47f72ec 100644 --- a/src/bun.js/bindings/CallSitePrototype.cpp +++ b/src/bun.js/bindings/CallSitePrototype.cpp @@ -234,15 +234,15 @@ JSC_DEFINE_HOST_FUNCTION(callSiteProtoFuncIsToplevel, (JSGlobalObject * globalOb // TODO: Fix Function constructor detection // ===================================== // KNOWN BUG: Code created with `new Function()` is not detected as eval by JSCStackFrame. - // + // // In Node.js/V8, Function constructor code is treated as eval code, which means: // - isEval() should return true // - isToplevel() should return false // - getFunctionName() should return "eval" (not the displayName) - // + // // Currently in Bun: // - isEval() returns false (WRONG - should be true) - // - isToplevel() returns true (WRONG - should be false) + // - isToplevel() returns true (WRONG - should be false) // - getFunctionName() returns the displayName (partially wrong - should be "eval" in some contexts) // // This is a deeper issue in how JSCStackFrame detects eval contexts. The Function @@ -254,7 +254,7 @@ JSC_DEFINE_HOST_FUNCTION(callSiteProtoFuncIsToplevel, (JSGlobalObject * globalOb // 2. Check the FunctionExecutable's source provider type for Function constructor origin // 3. Or add a special flag when code is created via Function constructor in JSC // - // Failing test: test/js/node/v8/capture-stack-trace.test.js + // Failing test: test/js/node/v8/capture-stack-trace.test.js // "CallFrame isTopLevel returns false for Function constructor" // // Example code that fails: