diff --git a/src/lib/base.html b/src/lib/base.html
index 4f557b9eb2..42d54ae7d9 100644
--- a/src/lib/base.html
+++ b/src/lib/base.html
@@ -46,6 +46,7 @@
}
} else {
this._desugarBehaviors(); // abstract
+ // previously factor behavior call unrolled for perf
for (var i=0, b; i < this.behaviors.length; i++) {
b = this.behaviors[i];
if (b.beforeRegister) {
@@ -68,6 +69,7 @@
}
Polymer.telemetry.instanceCount++;
this.root = this;
+ // previously factor behavior call unrolled for perf
for (var i=0, b; i < this.behaviors.length; i++) {
b = this.behaviors[i];
if (b.created) {
@@ -97,6 +99,7 @@
// IFF `lazyRegister` is 'max'
if (settings.lazyRegister === 'max') {
proto._desugarBehaviors(); // abstract
+ // previously factor behavior call unrolled for perf
for (var i=0, b; i < proto.behaviors.length; i++) {
b = proto.behaviors[i];
if (b.beforeRegister) {
@@ -109,6 +112,7 @@
proto._finishRegisterFeatures();
}
// registration extension point
+ // previously factor behavior call unrolled for perf
for (var j=0, pb; j < proto.behaviors.length; j++) {
pb = proto.behaviors[j];
if (pb.registered) {
@@ -135,6 +139,7 @@
var self = this;
Polymer.RenderStatus.whenReady(function() {
self.isAttached = true;
+ // previously factor behavior call unrolled for perf
for (var i=0, b; i < self.behaviors.length; i++) {
b = self.behaviors[i];
if (b.attached) {
@@ -153,6 +158,7 @@
var self = this;
Polymer.RenderStatus.whenReady(function() {
self.isAttached = false;
+ // previously factor behavior call unrolled for perf
for (var i=0, b; i < self.behaviors.length; i++) {
b = self.behaviors[i];
if (b.detached) {
@@ -170,6 +176,7 @@
// TODO(sorvell): consider filtering out changes to host attributes
// note: this was barely measurable with 3 host attributes.
this._attributeChangedImpl(name); // abstract
+ // previously factor behavior call unrolled for perf
for (var i=0, b; i < this.behaviors.length; i++) {
b = this.behaviors[i];
if (b.attributeChanged) {
diff --git a/src/lib/dom-module.html b/src/lib/dom-module.html
index 5a78115919..3efcb3b23a 100644
--- a/src/lib/dom-module.html
+++ b/src/lib/dom-module.html
@@ -84,7 +84,7 @@
});
Object.defineProperty(DomModule.prototype, 'constructor', {
- value: DomModule, configurable: true
+ value: DomModule, configurable: true, writable: true
});
// NOTE: HTMLImports polyfill does not
diff --git a/src/micro/behaviors.html b/src/micro/behaviors.html
index 8cc51a48c8..da92c02ab1 100644
--- a/src/micro/behaviors.html
+++ b/src/micro/behaviors.html
@@ -101,10 +101,10 @@
_mixinBehavior: function(b) {
var n$ = Object.getOwnPropertyNames(b);
- var skipDefine = b._skipDefineProperty;
+ var useAssignment = b._noAccessors;
for (var i=0, n; (i
diff --git a/test/unit/base.html b/test/unit/base.html
index 3f14997256..a4ec52ec4e 100644
--- a/test/unit/base.html
+++ b/test/unit/base.html
@@ -37,11 +37,6 @@
Child._setAttributeToProperty = function() {};
Child.behaviors = [];
Child._desugarBehaviors = function() {};
- Child._doBehavior = function(name, args) {
- if (this[name]) {
- this[name].apply(this, args || []);
- }
- };
instance = Object.create(Child);
// make __proto__ work on IE10.
if (!Object.__proto__) {