Title: [182568] trunk/Websites/perf.webkit.org
Revision
182568
Author
[email protected]
Date
2015-04-08 14:16:06 -0700 (Wed, 08 Apr 2015)

Log Message

Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.

* public/v2/app.js:
(App.Pane._fetch):
(App.Pane.refetchRuns):

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (182567 => 182568)


--- trunk/Websites/perf.webkit.org/ChangeLog	2015-04-08 21:14:09 UTC (rev 182567)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2015-04-08 21:16:06 UTC (rev 182568)
@@ -1,3 +1,11 @@
+2015-04-08  Ryosuke Niwa  <[email protected]>
+
+        Unreviewed fix after r182496 for when the cached runs JSON doesn't exist.
+
+        * public/v2/app.js:
+        (App.Pane._fetch):
+        (App.Pane.refetchRuns):
+
 2015-04-07  Ryosuke Niwa  <[email protected]>
 
         Perf dashboard should have a way of marking outliers

Modified: trunk/Websites/perf.webkit.org/public/v2/app.js (182567 => 182568)


--- trunk/Websites/perf.webkit.org/public/v2/app.js	2015-04-08 21:14:09 UTC (rev 182567)
+++ trunk/Websites/perf.webkit.org/public/v2/app.js	2015-04-08 21:16:06 UTC (rev 182568)
@@ -353,21 +353,24 @@
             var useCache = true;
             App.Manifest.fetchRunsWithPlatformAndMetric(this.get('store'), platformId, metricId, null, useCache)
                 .then(function (result) {
-                    self._didFetchRuns(result);
-                    if (result.shouldRefetch)
-                        self.refetchRuns();
+                    if (result || result.shouldRefetch)
+                        self.refetchRuns(platformId, metricId);
+                    else
+                        self._didFetchRuns(result);
                 }, this._handleFetchErrors.bind(this, platformId, metricId));
             this.fetchAnalyticRanges();
         }
     }.observes('platformId', 'metricId').on('init'),
-    refetchRuns: function () {
-        var platform = this.get('platform');
-        var metric = this.get('metric');
-        Ember.assert('refetchRuns should be called only after platform and metric are resolved', platform && metric);
+    refetchRuns: function (platformId, metricId) {
+        if (!platformId)
+            platformId = this.get('platform').get('id');
+        if (!metricId)
+            metricId = this.get('metric').get('id');
+        Ember.assert('refetchRuns should be called only after platform and metric are resolved', platformId && metricId);
 
         var useCache = false;
-        App.Manifest.fetchRunsWithPlatformAndMetric(this.get('store'), platform.get('id'), metric.get('id'), null, useCache)
-            .then(this._didFetchRuns.bind(this), this._handleFetchErrors.bind(this, platform.get('id'), metric.get('id')));
+        App.Manifest.fetchRunsWithPlatformAndMetric(this.get('store'), platformId, metricId, null, useCache)
+            .then(this._didFetchRuns.bind(this), this._handleFetchErrors.bind(this, platformId, metricId));
     },
     _didFetchRuns: function (result)
     {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to