Changes between Initial Version and Version 6 of Ticket #4257
- Timestamp:
- Aug 16, 2017, 6:36:43 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4257
- Property Milestone Backlog → Alpha 23
-
Ticket #4257 – Description
initial v6 3 3 However, returning an object means that the reference is returned, not a copy. This isn't an issue if that object was newly created (or cloned). But if the function returns an object which is accessible outside of the scope of the function (f.e. a global cache variable), modifying the returned object modifies the cache, which is not intentional and adulterates the original data. 4 4 5 This is often not considered and has caused a number of bugs already, f.e. r18788 r17324 r17 441 r17712 r17715.5 This is often not considered and has caused a number of bugs already, f.e. r18788 r17324 r17673 r17441 r17712 r17715. 6 6 7 7 The mentioned functions should use `Object.freeze` to ensure that the returned object can't be modified.