From 9e90fd2eaca2a4ba2d034d8fe51877bd36a47e7c Mon Sep 17 00:00:00 2001 From: Russell Bicknell Date: Fri, 23 Aug 2019 17:22:38 -0700 Subject: [PATCH] Wrap `hasOwnProperty` checks for `__hasRegisterFinished` in `JSCompiler_renameProperty()`. --- lib/legacy/class.js | 2 +- lib/legacy/legacy-element-mixin.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;