diff --git a/lib/legacy/class.js b/lib/legacy/class.js index f28f15d93f..b623fa1b87 100644 --- a/lib/legacy/class.js +++ b/lib/legacy/class.js @@ -301,7 +301,7 @@ function GenerateClassFromInfo(info, Base, behaviors) { */ // only proceed if the generated class' prototype has not been registered. const generatedProto = PolymerGenerated.prototype; - if (!generatedProto.hasOwnProperty('__hasRegisterFinished')) { + if (!generatedProto.hasOwnProperty(JSCompiler_renameProperty('__hasRegisterFinished', generatedProto))) { generatedProto.__hasRegisterFinished = true; // ensure superclass is registered first. super._registered(); diff --git a/lib/legacy/legacy-element-mixin.js b/lib/legacy/legacy-element-mixin.js index c4aa7a0286..dba9b298b0 100644 --- a/lib/legacy/legacy-element-mixin.js +++ b/lib/legacy/legacy-element-mixin.js @@ -179,7 +179,7 @@ export const LegacyElementMixin = dedupingMixin((base) => { */ _initializeProperties() { let proto = Object.getPrototypeOf(this); - if (!proto.hasOwnProperty('__hasRegisterFinished')) { + if (!proto.hasOwnProperty(JSCompiler_renameProperty('__hasRegisterFinished', proto))) { this._registered(); // backstop in case the `_registered` implementation does not set this proto.__hasRegisterFinished = true; diff --git a/lib/mixins/properties-changed.js b/lib/mixins/properties-changed.js index ff49a5746b..4d8e8e7cfc 100644 --- a/lib/mixins/properties-changed.js +++ b/lib/mixins/properties-changed.js @@ -113,7 +113,7 @@ export const PropertiesChanged = dedupingMixin( */ _createPropertyAccessor(property, readOnly) { this._addPropertyToAttributeMap(property); - if (!this.hasOwnProperty('__dataHasAccessor')) { + if (!this.hasOwnProperty(JSCompiler_renameProperty('__dataHasAccessor', this))) { this.__dataHasAccessor = Object.assign({}, this.__dataHasAccessor); } if (!this.__dataHasAccessor[property]) { @@ -131,7 +131,7 @@ export const PropertiesChanged = dedupingMixin( * @override */ _addPropertyToAttributeMap(property) { - if (!this.hasOwnProperty('__dataAttributes')) { + if (!this.hasOwnProperty(JSCompiler_renameProperty('__dataAttributes', this))) { this.__dataAttributes = Object.assign({}, this.__dataAttributes); } if (!this.__dataAttributes[property]) { diff --git a/lib/mixins/properties-mixin.js b/lib/mixins/properties-mixin.js index 06fe449d38..41757e3df3 100644 --- a/lib/mixins/properties-mixin.js +++ b/lib/mixins/properties-mixin.js @@ -119,7 +119,7 @@ export const PropertiesMixin = dedupingMixin(superClass => { * @nocollapse */ static get observedAttributes() { - if (!this.hasOwnProperty('__observedAttributes')) { + if (!this.hasOwnProperty(JSCompiler_renameProperty('__observedAttributes', this))) { register(this.prototype); const props = this._properties; this.__observedAttributes = props ? Object.keys(props).map(p => this.attributeNameForProperty(p)) : [];