Commit 558c328a authored by dbeam's avatar dbeam Committed by Commit bot

history: fix closure compilation by fixing non-standardized use of setInterval().

BUG=393873
R=estade@chromium.org

Review URL: https://codereview.chromium.org/617673002

Cr-Commit-Position: refs/heads/master@{#297344}
parent 3116444f
...@@ -1737,18 +1737,18 @@ function PageState(model, view) { ...@@ -1737,18 +1737,18 @@ function PageState(model, view) {
// TODO(glen): Replace this with a bound method so we don't need // TODO(glen): Replace this with a bound method so we don't need
// public model and view. // public model and view.
this.checker_ = window.setInterval(function(stateObj) { this.checker_ = window.setInterval(function() {
var hashData = stateObj.getHashData(); var hashData = this.getHashData();
var page = parseInt(hashData.page, 10); var page = parseInt(hashData.page, 10);
var range = parseInt(hashData.range, 10); var range = parseInt(hashData.range, 10);
var offset = parseInt(hashData.offset, 10); var offset = parseInt(hashData.offset, 10);
if (hashData.q != stateObj.model.getSearchText() || if (hashData.q != this.model.getSearchText() ||
page != stateObj.view.getPage() || page != this.view.getPage() ||
range != stateObj.model.rangeInDays || range != this.model.rangeInDays ||
offset != stateObj.model.offset) { offset != this.model.offset) {
stateObj.view.setPageState(hashData.q, page, range, offset); this.view.setPageState(hashData.q, page, range, offset);
} }
}, 50, this); }.bind(this), 50);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment