From 0541b21ac429def7f44cab1fa33e4542237ec916 Mon Sep 17 00:00:00 2001 From: Russell Bicknell Date: Mon, 26 Aug 2019 10:32:26 -0700 Subject: [PATCH] Wrap other `hasOwnProperty` checks in `JSCompiler_renameProperty`. --- lib/mixins/properties-changed.js | 4 ++-- lib/mixins/properties-mixin.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)) : [];