mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
* Faster napi * Reduce number of headers exposed for JSStringDecoder * Add missing header * test: this test was meant to be marked as TODO * revert the string decoder garbage --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
20 lines
460 B
C++
20 lines
460 B
C++
#include "napi_external.h"
|
|
#include "napi.h"
|
|
|
|
namespace Bun {
|
|
|
|
NapiExternal::~NapiExternal()
|
|
{
|
|
if (finalizer) {
|
|
reinterpret_cast<napi_finalize>(finalizer)(toNapi(globalObject()), m_value, m_finalizerHint);
|
|
}
|
|
}
|
|
|
|
void NapiExternal::destroy(JSC::JSCell* cell)
|
|
{
|
|
static_cast<NapiExternal*>(cell)->~NapiExternal();
|
|
}
|
|
|
|
const ClassInfo NapiExternal::s_info = { "External"_s, &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(NapiExternal) };
|
|
|
|
} |