From b26811708facd4edcd78397b4577610c07ebc757 Mon Sep 17 00:00:00 2001 From: Peter Burns Date: Wed, 27 Jun 2018 14:52:45 -0700 Subject: [PATCH 01/27] Convert object to class for better compilation Under some closure flags the hostStack object was being split out into three unrelated functions. Converting it to a class makes the code more regular, and compile with more optimizations on. There's almost definitely a way to express what we were doing with closure annotations, but this seems more robust to me. --- lib/mixins/property-effects.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index 91b5d120..8567df7d 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -2772,35 +2772,33 @@ export const PropertyEffects = dedupingMixin(superClass => { * * @private */ -let hostStack = { - - stack: [], +class HostStack { + constructor() { + this.stack = []; + } /** * @param {*} inst Instance to add to hostStack * @return {void} - * @this {hostStack} */ registerHost(inst) { if (this.stack.length) { let host = this.stack[this.stack.length-1]; host._enqueueClient(inst); } - }, + } /** * @param {*} inst Instance to begin hosting * @return {void} - * @this {hostStack} */ beginHosting(inst) { this.stack.push(inst); - }, + } /** * @param {*} inst Instance to end hosting * @return {void} - * @this {hostStack} */ endHosting(inst) { let stackLen = this.stack.length; @@ -2808,5 +2806,5 @@ let hostStack = { this.stack.pop(); } } - -}; +} +const hostStack = new HostStack(); From 84455c9cebe993506ec03692c5865406ea39966f Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Thu, 28 Jun 2018 12:45:47 +0200 Subject: [PATCH 02/27] Fix method to force CE polyfill on in 3.x --- test/unit/shady-content.html | 5 ++--- test/unit/shady-dynamic.html | 5 ++--- test/unit/shady-events.html | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/test/unit/shady-content.html b/test/unit/shady-content.html index d5a0e362..a5804be1 100644 --- a/test/unit/shady-content.html +++ b/test/unit/shady-content.html @@ -12,10 +12,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN