aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/modules/ObjectModule.h
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-09-03 21:03:50 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-09-03 21:03:50 -0700
commitcc46604bdbb228dff1b868c21e15455072246f2c (patch)
tree5cc7a2b2191b7effb63447f21f917d3da9ba89ef /src/bun.js/modules/ObjectModule.h
parentbcbd44876787601bcaec73daf53a067291e857a8 (diff)
downloadbun-cc46604bdbb228dff1b868c21e15455072246f2c.tar.gz
bun-cc46604bdbb228dff1b868c21e15455072246f2c.tar.zst
bun-cc46604bdbb228dff1b868c21e15455072246f2c.zip
Fix build error
Diffstat (limited to 'src/bun.js/modules/ObjectModule.h')
-rw-r--r--src/bun.js/modules/ObjectModule.h11
1 files changed, 5 insertions, 6 deletions
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<JSC::JSObject>(vm, object)](
- JSC::JSGlobalObject *lexicalGlobalObject,
- JSC::Identifier moduleKey, Vector<JSC::Identifier, 4> &exportNames,
- JSC::MarkedArgumentBuffer &exportValues) -> void {
+ return [object](JSC::JSGlobalObject *lexicalGlobalObject,
+ JSC::Identifier moduleKey,
+ Vector<JSC::Identifier, 4> &exportNames,
+ JSC::MarkedArgumentBuffer &exportValues) -> void {
JSC::VM &vm = lexicalGlobalObject->vm();
GlobalObject *globalObject =
reinterpret_cast<GlobalObject *>(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();
};
}