Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Unified Diff: chrome/browser/resources/history/history.js

Issue 617673002: history: fix closure compilation by fixing non-standardized use of setInterval(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contextObj -> bind(this) Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/history/history.js
diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js
index d300d25041244e0184b7d6fdbc4f0270374f3d09..a728a9df641d5e4697d142ab2e0fc0485936f6f7 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -1737,18 +1737,18 @@ function PageState(model, view) {
// TODO(glen): Replace this with a bound method so we don't need
// public model and view.
- this.checker_ = window.setInterval(function(stateObj) {
- var hashData = stateObj.getHashData();
+ this.checker_ = window.setInterval(function() {
+ var hashData = this.getHashData();
var page = parseInt(hashData.page, 10);
var range = parseInt(hashData.range, 10);
var offset = parseInt(hashData.offset, 10);
- if (hashData.q != stateObj.model.getSearchText() ||
- page != stateObj.view.getPage() ||
- range != stateObj.model.rangeInDays ||
- offset != stateObj.model.offset) {
- stateObj.view.setPageState(hashData.q, page, range, offset);
+ if (hashData.q != this.model.getSearchText() ||
+ page != this.view.getPage() ||
+ range != this.model.rangeInDays ||
+ offset != this.model.offset) {
+ this.view.setPageState(hashData.q, page, range, offset);
}
- }, 50, this);
+ }.bind(this), 50);
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698