fix(es6): stringify using an opaque ID rather than toString#7825
fix(es6): stringify using an opaque ID rather than toString#7825alexeagle wants to merge 1 commit intoangular:masterfrom
Conversation
4f35086 to
dfc6c33
Compare
modules/angular2/src/facade/lang.ts
Outdated
There was a problem hiding this comment.
This gets slower over time and contains a memory leak.
Better: Create a facade around a WeakMap in JS and Expando in Dart (see https://api.dartlang.org/stable/1.15.0/dart-core/Expando-class.html)
There was a problem hiding this comment.
Also, I don't think this is the right place to do this. Rather, we should change our codegen to check for this and keep a local map of the produced symbols. My current PR is already doing this....
There was a problem hiding this comment.
Could you paste the code that breaks? I.e. so that we can find and fix the place where we generate the code, and don't have to do this in this global helper, which might be used for other things than codegen?
There was a problem hiding this comment.
Moved this logic into runtime_metadata.ts and switched to Map to store the anonymous function objects.
10c0e31 to
d60e838
Compare
There was a problem hiding this comment.
Move up to the other field declarations, before the constructor.
Use _ prefix (so the field is private also in Dart)
…ens.
Using toString results in 'function (_arg1, arg2) {' when using closure compiler for 6-to-5.
|
Merging PR #7825 on behalf of @kara to branch presubmit-kara-pr-7825. |
|
That's the same fix that's necessary for #6501 |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Using toString results in 'function (_arg1, arg2) {' when using closure compiler for 6-to-5.