diff options
Diffstat (limited to 'src/bun.js/modules/ObjectModule.h')
-rw-r--r-- | src/bun.js/modules/ObjectModule.h | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/bun.js/modules/ObjectModule.h b/src/bun.js/modules/ObjectModule.h index 3a651b0c4..25a3e5130 100644 --- a/src/bun.js/modules/ObjectModule.h +++ b/src/bun.js/modules/ObjectModule.h @@ -4,30 +4,8 @@ #include "JavaScriptCore/JSGlobalObject.h" namespace Zig { -inline JSC::SyntheticSourceProvider::SyntheticSourceGenerator +JSC::SyntheticSourceProvider::SyntheticSourceGenerator generateObjectModuleSourceCode(JSC::JSGlobalObject *globalObject, - JSC::JSObject *object) { - JSC::VM &vm = globalObject->vm(); - - 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::EnsureStillAliveScope stillAlive(object); - - PropertyNameArray properties(vm, PropertyNameMode::Strings, - PrivateSymbolMode::Exclude); - object->getPropertyNames(globalObject, properties, - DontEnumPropertiesMode::Exclude); - - for (auto &entry : properties) { - exportNames.append(entry); - exportValues.append(object->get(globalObject, entry)); - } - }; -} + JSC::JSObject *object); } // namespace Zig
\ No newline at end of file |