Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
remove unused isolateObservers optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Jan 14, 2014
1 parent 9b336be commit 5b237da
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/observe.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,8 @@

var lastObservedSet;

function getObservedSet(observer, obj, isolateObservers) {
if (isolateObservers || !lastObservedSet ||
lastObservedSet.object !== obj) {
function getObservedSet(observer, obj) {
if (!lastObservedSet || lastObservedSet.object !== obj) {
lastObservedSet = observedSetCache.pop() || newObservedSet();
lastObservedSet.object = obj;
}
Expand Down Expand Up @@ -882,10 +881,9 @@
}
});

function CompoundObserver(isolateObservers) {
function CompoundObserver() {
Observer.call(this);

this.isolateObservers_ = isolateObservers;
this.value_ = [];
this.directObserver_ = undefined;
this.observed_ = [];
Expand Down Expand Up @@ -923,8 +921,7 @@
}

if (needsDirectObserver)
this.directObserver_ = getObservedSet(this, object,
this.isolateObservers_);
this.directObserver_ = getObservedSet(this, object);
},

closeObservers_: function() {
Expand Down

0 comments on commit 5b237da

Please sign in to comment.