-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Move each proxy into a weak map #16215
Conversation
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.
Looks good!
this.__each = new EachProxy(this); | ||
} | ||
deprecate( | ||
"Getting the '@each' property is deprecated", |
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.
The message needs to include more details, or it’s going to be very hard to track down...
|
||
return this.__each; | ||
return meta(this).eachProxy; | ||
}).volatile().readOnly() |
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.
I can’t recall, why is this volatile (seems like it is stable based on the implementation)?
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.
I don't know exactly why it was volatile, but it certainly doesn't need to be now (in fact, we could remove this CP if we wanted).
6b10d12
to
2a2a6fd
Compare
In chat, Rob suggested I move the each proxy into a weakmap rather than meta. I will do this. |
2a2a6fd
to
97c7080
Compare
... and fix some tests that should ahve been testing the method version of objectAt.
97c7080
to
00a7488
Compare
@rwjblue Updated. |
get
ing@each
. I am treating this as an intimate private API.objectAt
into ember-metal to avoid ember-metal depending on ember-runtime.array.objectAt(i)
instead ofobjectAt(array, i)
.Remaining items: