internal: remove secret hidden internals and introduce new way to call native code from js (#8166)

* oooooh magic

* stuff

* run format

* ok

* yippee

* run the formatter back

* finish things up

* fix webkit

* more

* [autofix.ci] apply automated fixes

* fix compile

* fix compilation on windows, it seems to not work though :(

* update

* a

* v

* ok

* [autofix.ci] apply automated fixes

* OOPS

* bump bun to reduce ci bugs

* a

* js2native is done!

* improve array binding

* rebase

* some final stuff

* wasi fixes

* os

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
dave caruso
2024-03-29 21:47:11 -07:00
committed by GitHub
parent a500c69728
commit d712254128
128 changed files with 2139 additions and 1976 deletions

View File

@@ -35,6 +35,7 @@
#include "NativeModuleImpl.h"
#include "../modules/ObjectModule.h"
#include "wtf/Assertions.h"
namespace Bun {
using namespace JSC;
@@ -75,7 +76,7 @@ static JSC::SyntheticSourceProvider::SyntheticSourceGenerator generateInternalMo
JSValue requireResult = globalObject->internalModuleRegistry()->requireId(globalObject, vm, moduleId);
RETURN_IF_EXCEPTION(throwScope, void());
auto* object = requireResult.getObject();
ASSERT(object);
ASSERT_WITH_MESSAGE(object, "Expected object from requireId %s", moduleKey.string().string().utf8().data());
JSC::EnsureStillAliveScope stillAlive(object);