Not all callback functions are checked for strict mode. When the function itself is strict, we shouldn't pass global as the this parameter, but undefined instead. This should be implemented generically. Currently String.replace does this correctly, but that logic should be moved elsewhere.
Not all callback functions are checked for strict mode. When the function itself is strict, we shouldn't pass global as the
thisparameter, butundefinedinstead. This should be implemented generically. CurrentlyString.replacedoes this correctly, but that logic should be moved elsewhere.