Skip to content

Exo classes need to handle non-enumerable raw methods correctly. #1817

@erights

Description

@erights

Currently, the exo class creation functions fail to handle non-enumerable raw methods correctly.

At

const { constructor: _, ...methods } = behaviorMethods;

the code uses ... destructuring to take apart a collection of raw methods. But ... destructuring only gathers enumerable own methods.

At

...behaviorMethods,

the code uses ... to add the raw methods into a larger collection of methods. But ... only extracts enumerable own methods.

So far, all raw methods arguments to the exo makers formed the collection of raw methods using an object literal, so all the methods were enumerable-own anyway. However, this code is intended to support use of a JavaScript class' .prototype as a collection of raw methods. These two flaws prevent that.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions