diff --git a/lib/legacy/class.js b/lib/legacy/class.js index c64aec55bf..9db14be0be 100644 --- a/lib/legacy/class.js +++ b/lib/legacy/class.js @@ -302,7 +302,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 be7fdc828a..963e496853 100644 --- a/lib/legacy/legacy-element-mixin.js +++ b/lib/legacy/legacy-element-mixin.js @@ -194,7 +194,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 cc2801d415..854b5b72f8 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); } // This check is technically not correct; it's an optimization that diff --git a/lib/mixins/properties-mixin.js b/lib/mixins/properties-mixin.js index 9420e79769..b13e6e154e 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.prototype._addPropertyToAttributeMap(p)) : [];