From 08cf0d562ae81b4fb30aa5e599ca76056582ac5f Mon Sep 17 00:00:00 2001 From: Ashcon Partovi Date: Thu, 3 Aug 2023 15:31:55 -0700 Subject: Bunch of fixes (#3516) * Fix #3497 * Fix #3497 * Run prettier * Fix package.json * remove this too * yeah * Fix missing tests * Use native for utf-8-validate * Add module ID names to builtins * Defer evaluation of ESM & CJS modules until link time * Use builtin name for exports in plugins * Add module IDs to builtins * Update JSC build with new flag * WebKit upgrade fixes * Update WebKit * prettier * Upgrade WebKit * bump * Update once again * Add visitAdditionalChildren, remove .fill() usage * Update process.test.js * Update fs.test.ts --------- Co-authored-by: dave caruso Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/bun.js/modules/BunJSCModule.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/bun.js/modules/BunJSCModule.h') diff --git a/src/bun.js/modules/BunJSCModule.h b/src/bun.js/modules/BunJSCModule.h index c5350fcd7..d7548dcdf 100644 --- a/src/bun.js/modules/BunJSCModule.h +++ b/src/bun.js/modules/BunJSCModule.h @@ -47,6 +47,7 @@ JSC_DEFINE_HOST_FUNCTION(functionStartRemoteDebugger, #if ENABLE(REMOTE_INSPECTOR) static const char *defaultHost = "127.0.0.1\0"; static uint16_t defaultPort = 9230; // node + 1 + auto &vm = globalObject->vm(); auto scope = DECLARE_THROW_SCOPE(vm); @@ -311,7 +312,8 @@ JSC_DEFINE_HOST_FUNCTION(functionSamplingProfilerStackTraces, globalObject, scope, createError(globalObject, "Sampling profiler was never started"_s))); - WTF::String jsonString = vm.samplingProfiler()->stackTracesAsJSON(); + WTF::String jsonString = + vm.samplingProfiler()->stackTracesAsJSON()->toJSONString(); JSC::EncodedJSValue result = JSC::JSValue::encode(JSONParse(globalObject, jsonString)); scope.releaseAssertNoException(); @@ -519,8 +521,8 @@ JSC_DEFINE_HOST_FUNCTION(functionRunProfiler, (JSGlobalObject * globalObject, StringPrintStream byteCodes; samplingProfiler.reportTopBytecodes(byteCodes); - JSValue stackTraces = - JSONParse(globalObject, samplingProfiler.stackTracesAsJSON()); + JSValue stackTraces = JSONParse( + globalObject, samplingProfiler.stackTracesAsJSON()->toJSONString()); samplingProfiler.shutdown(); samplingProfiler.clearData(); -- cgit v1.2.3