node: fix all of test-event-emitter (#16009)

This commit is contained in:
Meghan Denny
2024-12-27 01:34:49 -08:00
committed by GitHub
parent 19675f474a
commit 4bcc5b25d9
65 changed files with 1733 additions and 404 deletions

View File

@@ -1,6 +1,7 @@
// clang-format off
#include "BakeSourceProvider.h"
#include "BakeGlobalObject.h"
#include "JavaScriptCore/CallData.h"
#include "JavaScriptCore/Completion.h"
#include "JavaScriptCore/Identifier.h"
#include "JavaScriptCore/JSCJSValue.h"
@@ -41,7 +42,7 @@ extern "C" JSC::EncodedJSValue BakeLoadInitialServerCode(GlobalObject* global, B
args.append(JSC::jsBoolean(separateSSRGraph)); // separateSSRGraph
args.append(Zig::ImportMetaObject::create(global, "bake://server-runtime.js"_s)); // importMeta
return JSC::JSValue::encode(JSC::call(global, fn, callData, JSC::jsUndefined(), args));
return JSC::JSValue::encode(JSC::profiledCall(global, JSC::ProfilingReason::API, fn, callData, JSC::jsUndefined(), args));
}
extern "C" JSC::JSInternalPromise* BakeLoadModuleByKey(GlobalObject* global, JSC::JSString* key) {
@@ -61,7 +62,7 @@ extern "C" JSC::EncodedJSValue BakeLoadServerHmrPatch(GlobalObject* global, BunS
WTF::TextPosition(),
JSC::SourceProviderSourceType::Program
));
JSC::JSValue result = vm.interpreter.executeProgram(sourceCode, global, global);
RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode({}));
@@ -124,7 +125,7 @@ extern "C" JSC::EncodedJSValue BakeRegisterProductionChunk(JSC::JSGlobalObject*
WTF::TextPosition(),
JSC::SourceProviderSourceType::Module
));
global->moduleLoader()->provideFetch(global, key, sourceCode);
RETURN_IF_EXCEPTION(scope, JSC::JSValue::encode({}));