Skip to content

Commit

Permalink
don't alter shape of meta object in ctor
Browse files Browse the repository at this point in the history
thanks @eviltrout and @ebryn
  • Loading branch information
krisselden committed Aug 19, 2013
1 parent ed3c4a2 commit 2cc3d91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ember-runtime/lib/system/core_object.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function makeCtor() {
}
o_defineProperty(this, GUID_KEY, undefinedDescriptor);
o_defineProperty(this, '_super', undefinedDescriptor);
var m = meta(this);
var m = meta(this), proto = m.proto;
m.proto = this;
if (initMixins) {
// capture locally so we can clear the closed over variable
Expand Down Expand Up @@ -120,7 +120,7 @@ function makeCtor() {
}
}
finishPartial(this, m);
delete m.proto;
m.proto = proto;
finishChains(this);
this.init.apply(this, arguments);
sendEvent(this, "didInit");
Expand Down

2 comments on commit 2cc3d91

@lukemelia
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kselden Is this an improvement because delete is deoptimizing?

@petkaantonov
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.