-
Notifications
You must be signed in to change notification settings - Fork 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
Fix for 2348 and 2344 #2349
Fix for 2348 and 2344 #2349
Conversation
Indeed it fixes #2344 as well... |
added @sjmiles to take a look on this as he was active on the corresponding issue |
Patches applied on top of stable version: * Polymer/polymer#2205 * Polymer/polymer#2247 * Polymer/polymer#2295 * Polymer/polymer#2322 * Polymer/polymer#2349 * Polymer/polymer#2419
List of patches applied on top of stable version (one previous patch upstreamed, the rest are still here): * Polymer/polymer#2205 * Polymer/polymer#2247 * Polymer/polymer#2295 * Polymer/polymer#2349 * Polymer/polymer#2419 * Polymer/polymer#2642 * Polymer/polymer#2663 * Polymer/polymer#2664
List of patches applied on top of git version (2 previous patches upstreamed, the rest are still here + 2 new patches added): * Polymer/polymer#2205 * Polymer/polymer#2247 * Polymer/polymer#2295 * Polymer/polymer#2349 * Polymer/polymer#2419 * Polymer/polymer#2642 * Polymer/polymer#2689 * Polymer/polymer#2692 * Polymer/polymer#2694
25fd10e
to
0a2e56d
Compare
List of patches applied on top of git version (no new patches upstreamed since last time:(): * Polymer/polymer#2205 * Polymer/polymer#2247 * Polymer/polymer#2295 * Polymer/polymer#2349 * Polymer/polymer#2419 * Polymer/polymer#2642 * Polymer/polymer#2689 * https://github.com/Polymer/polymer/tree/fix-2692 branch supersedes Polymer/polymer#2692 * Polymer/polymer#2694
List of patches applied on top of git version (4 previous patches upstreamed and one fixed by alternative patch, yay!): * Polymer/polymer#2205 * Polymer/polymer#2247 * Polymer/polymer#2349 * Polymer/polymer#2419 * Polymer/polymer#3215
@@ -121,6 +121,9 @@ | |||
value = value.call(this, this._config); | |||
} | |||
config[i] = value; | |||
} else if (this.hasOwnProperty(i)) { |
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.
this[i] !== undefined
should be faster than hasOwnProperty
.
Sorry for the time lag on this. The main concern with this change is incurring a performance penalty on elements that do not have early-set properties. Would you be willing to do some performance testing on this? Thank. |
0a2e56d
to
1e786bb
Compare
Modified as you suggested. Without patch Code I've used for testing: http://pastebin.com/ZdMnrZqN |
@@ -121,6 +121,9 @@ | |||
value = value.call(this, this._config); | |||
} | |||
config[i] = value; | |||
} else if (this[i] !== undefined) { |
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.
Seems like the check if
and the else if
should be switched here. If there's an existing value, we should take that and not the default value.
We plan to do some perf testing to see what overhead this adds to elements without early-property sets. |
1e786bb
to
669f7be
Compare
Modified as suggested |
List of patches applied on top of git version (1 previous patch upstreamed, 4 more added): * Polymer/polymer#2205 * Polymer/polymer#2247 * Polymer/polymer#2349 * Polymer/polymer#2419 * Polymer/polymer#3222 * Polymer/polymer#3344 * Polymer/polymer#3279 * Polymer/polymer#3276
The performance of this change looks ok to me. Can you please add a test? Thanks. |
…y set on element before it is ready Test added
8040988
to
ecd9b09
Compare
@sorvell, I've managed to write test for this change, also rebased against master |
Fix for getters/setters for property become inaccessible when propery set on element before it is ready
Did not succeed in creating test case this time:(
Fixes #2348