From cc46604bdbb228dff1b868c21e15455072246f2c Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sat, 3 Sep 2022 21:03:50 -0700 Subject: Fix build error --- src/bun.js/modules/ObjectModule.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/bun.js/modules/ObjectModule.h') diff --git a/src/bun.js/modules/ObjectModule.h b/src/bun.js/modules/ObjectModule.h index 42ab4dfa5..27a357462 100644 --- a/src/bun.js/modules/ObjectModule.h +++ b/src/bun.js/modules/ObjectModule.h @@ -7,14 +7,14 @@ generateObjectModuleSourceCode(JSC::JSGlobalObject *globalObject, JSC::JSObject *object) { JSC::VM &vm = globalObject->vm(); - return [strongObject = JSC::Strong(vm, object)]( - JSC::JSGlobalObject *lexicalGlobalObject, - JSC::Identifier moduleKey, Vector &exportNames, - JSC::MarkedArgumentBuffer &exportValues) -> void { + return [object](JSC::JSGlobalObject *lexicalGlobalObject, + JSC::Identifier moduleKey, + Vector &exportNames, + JSC::MarkedArgumentBuffer &exportValues) -> void { JSC::VM &vm = lexicalGlobalObject->vm(); GlobalObject *globalObject = reinterpret_cast(lexicalGlobalObject); - JSC::JSObject *object = strongObject.get(); + JSC::EnsureStillAliveScope stillAlive(object); PropertyNameArray properties(vm, PropertyNameMode::Strings, PrivateSymbolMode::Exclude); @@ -25,7 +25,6 @@ generateObjectModuleSourceCode(JSC::JSGlobalObject *globalObject, exportNames.append(entry); exportValues.append(object->get(globalObject, entry)); } - strongObject.clear(); }; } -- cgit v1.2.3