-
Notifications
You must be signed in to change notification settings - Fork 532
Description
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.