Skip to content

Incorrect ignore-super-property-set(-not)-exported.js tests #4980

@iamstolis

Description

@iamstolis

Tests language/import/import-defer/evaluation-triggers/ignore-super-property-set-exported.js and language/import/import-defer/evaluation-triggers/ignore-super-property-set-not-exported.js expect deferred module evaluation not to be triggered because of namespace module object's [[Set]] override. I believe that these tests are incorrect:

super.x = ... leads to PutValue(superPropertyReference, ...) and yes PutValue(V, ...) invokes [[Set]] but on V.[[Base]] and superPropertyReference.[[Base]] is not this but [[HomeObject]].[[GetPrototypeOf]](). In other words, it is an ordinary [[Set]] (not the one of module namespace objects). The namespace object is passed as the receiver. So, we go through OrdinarySet() and OrdinarySetWithOwnDescriptor() that reads existingDescriptor (using Receiver.[[GetOwnProperty]](P)) which triggers the module evaluation.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions