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

Commit

Permalink
fix benchmark breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Jan 14, 2014
1 parent 17e2e93 commit 9b336be
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions benchmark/observation_benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
this.observers = []
this.index = 0;
this.mutationCount = 0;
this.boundObserverCallback = this.observerCallback.bind(this);
}

ObservationBenchmark.prototype = createObject({
Expand All @@ -45,7 +44,9 @@
while (this.objects.length < objectCount) {
var obj = this.newObject();
this.objects.push(obj);
this.observers.push(this.newObserver(obj));
var observer = this.newObserver(obj);
observer.open(this.observerCallback, this);
this.observers.push(observer);
}
},

Expand Down Expand Up @@ -100,7 +101,7 @@
},

newObserver: function(obj) {
return new ObjectObserver(obj, this.boundObserverCallback);
return new ObjectObserver(obj);
},

mutateObject: function(obj) {
Expand Down Expand Up @@ -134,7 +135,7 @@
},

newObserver: function(array) {
return new ArrayObserver(array, this.boundObserverCallback);
return new ArrayObserver(array);
},

mutateObject: function(array) {
Expand Down Expand Up @@ -195,7 +196,7 @@
},

newObserver: function(obj) {
return new PathObserver(obj, this.path, this.boundObserverCallback);
return new PathObserver(obj, this.path);
},

mutateObject: function(obj) {
Expand All @@ -214,4 +215,4 @@
global.ArrayBenchmark = ArrayBenchmark;
global.PathBenchmark = PathBenchmark;

})(this);
})(this);

0 comments on commit 9b336be

Please sign in to comment.