DelSkayn / rquickjs

High level bindings to the quickjs javascript engine
MIT License
431 stars 58 forks source link

Fix intrinsic loading order #300

Closed surma closed 2 months ago

surma commented 2 months ago

It is very sensible that since v0.6, the BaseObject intrinsic is always loaded. However, in a custom setup, the BaseObject intrinsic is loaded after the custom intrinsics, which means all the custom intrinsics cannot assume BaseObject. If BaseObject is added to the list of custom intrinsics, BaseObject gets loaded twice, which causes a SIGABORT.

Additionally, All still contains Base, which similarly causes SIGABORT.

This PR loads Base before the custom intrinsics. It also removes Base from All (and adds some tests for this).

DelSkayn commented 2 months ago

Thanks for the PR! Looks good!