mrousavy / nitro

🔥 Insanely fast native C++, Swift or Kotlin modules with a statically compiled binding layer to JSI
https://nitro.margelo.com
MIT License
650 stars 22 forks source link

fix: Support `toString()` without NativeState (fixes crash) #322

Closed mrousavy closed 1 week ago

mrousavy commented 1 week ago

If toString() is called on a HybridObject without a NativeState, this PR now changes the flow to not throw an error but instead actually return a stringified representation of the unbound Prototype

Might also fix this: https://github.com/mrousavy/nitro/issues/314

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **nitro-docs** | ⬜️ Skipped ([Inspect](https://vercel.com/margelo/nitro-docs/GY6xpx1ZPAjnf61B5dpELRJCkZa9)) | | | Nov 12, 2024 0:26am |
mrousavy commented 1 week ago

actually nvm this is not a good idea. It's completely unnecessary for production apps and just adds overhead.