Skip to content

importer: Remove JSClass macros

The macros in jsapi-class.h are not needed here. They actually require more boilerplate code than they prevent. Instead of using JS_InitClass() which requires a constructor and prototype object, we can just use JS_NewObject() which will use a plain object as the prototype.

We also don't need to store private data in the instances. The only private data used was a boolean flag indicating whether the importer is the root importer, but we can already figure this out by checking whether any of the importer the meta properties are null, which they are for the root importer.

Merge request reports