[SERVER-78597] Passthroughs must only evaluate in strict mode Created: 02/Jul/23  Updated: 29/Oct/23  Resolved: 05/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Matt Broadstone Assignee: Matt Broadstone
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Server Serverless 2023-07-10
Participants:

 Description   

In the process of migrating some override methods to modules, I discovered that a number of passthroughs are passing eval as a variable to the global test runner scope instead of evaluating the script in the context of the global scope. For example:

This is because strict mode is automatically enabled when async/await or modules are used in a script. These additional rules must be obeyed, and should be fixed in this ticket:

  • can't assign to an unknown value (must define it using var or member assignment to globalThis)


 Comments   
Comment by Githook User [ 03/Jul/23 ]

Author:

{'name': 'Matt Broadstone', 'email': 'mbroadst@mongodb.com', 'username': 'mbroadst'}

Message: SERVER-78597 Passthroughs must only evaluate in strict mode
Branch: master
https://github.com/mongodb/mongo/commit/9bfd2a0357ad2a3110adc3641627c0771e0e127c

Generated at Thu Feb 08 06:38:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.