-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Keep property records live on IteratorObjectEnumerator #2198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@digitalinfinity could you please take a look? |
digitalinfinity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if you've verified that the property records do get cleaned up correctly
| // Need to keep property records alive during enumeration to prevent collection | ||
| // and eventual reuse during the same enumeration. For DynamicObjects, property | ||
| // records are kept alive by type handlers. | ||
| this->propertyRecords.Prepend(iteratorObject->GetRecycler(), propertyRecord); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this cleared at some point?
|
Looks good, if they get cleaned up |
|
I looked through this, and we generally follow the convention of throwing away the enumerator at the end unless it can be reset (e.g. CustomEnumerator.) We don't expect to reset IteratorObjectEnumerator, so it is fine to leave the references attached to the enumerator reference. OK to merge. |
|
@tcare @digitalinfinity - thanks for the reviews. |
…merator Merge pull request #2198 from rajatd:iteratorEnum We need to keep property records for properties being enumerated live during enumeration. For dynamic objects, type handlers hold references to property records and for non-existent properties, we have code in ForInObjectEnumerator::MoveAndGetNext to keep the new records live. Taking care of this case for Proxies which use IteratorObjectEnumerator
…atorObjectEnumerator Merge pull request #2198 from rajatd:iteratorEnum We need to keep property records for properties being enumerated live during enumeration. For dynamic objects, type handlers hold references to property records and for non-existent properties, we have code in ForInObjectEnumerator::MoveAndGetNext to keep the new records live. Taking care of this case for Proxies which use IteratorObjectEnumerator
We need to keep property records for properties being enumerated live during enumeration. For dynamic objects, type handlers hold references to property records and for non-existent properties, we have code in ForInObjectEnumerator::MoveAndGetNext to keep the new records live.
Taking care of this case for Proxies which use IteratorObjectEnumerator
This change is