CommitLogViewer._preceedingCommit should not always be null
authordewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2018 20:15:08 +0000 (20:15 +0000)
committerdewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 May 2018 20:15:08 +0000 (20:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185540

Reviewed by Ryosuke Niwa.

Fix the bug introduced in r227746 that CommitLogViewer._preceedingCommit is always null.

* browser-tests/index.html: Fix expected measurement-set url.
* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype._fetchCommitLogs): CommitLogViewer._preceedingCommit should be set
when fetching for preceeding revision succeeds.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231715 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/browser-tests/index.html
Websites/perf.webkit.org/public/v3/components/commit-log-viewer.js

index 36e18f6..bd5b024 100644 (file)
@@ -1,3 +1,17 @@
+2018-05-10  Dewei Zhu  <dewei_zhu@apple.com>
+
+        CommitLogViewer._preceedingCommit should not always be null
+        https://bugs.webkit.org/show_bug.cgi?id=185540
+
+        Reviewed by Ryosuke Niwa.
+
+        Fix the bug introduced in r227746 that CommitLogViewer._preceedingCommit is always null.
+
+        * browser-tests/index.html: Fix expected measurement-set url.
+        * public/v3/components/commit-log-viewer.js:
+        (CommitLogViewer.prototype._fetchCommitLogs): CommitLogViewer._preceedingCommit should be set
+         when fetching for preceeding revision succeeds.
+
 2018-05-03  Dewei Zhu  <dewei_zhu@apple.com>
 
         Range bisector should check the commits for repositories without change in specified range.
index 517ae85..dded179 100644 (file)
@@ -363,7 +363,7 @@ const ChartTest = {
 
     respondWithSampleCluster(request, options)
     {
-        expect(request.url).to.be('../data/measurement-set-1-1.json');
+        expect(request.url).to.be('/data/measurement-set-1-1.json');
         expect(request.method).to.be('GET');
         request.resolve(this.makeSampleCluster(options));
     },
index 005b552..7a8e3b9 100644 (file)
@@ -36,7 +36,6 @@ class CommitLogViewer extends ComponentBase {
         }
 
         let promise;
-        let precedingCommitPromise;
         const fetchSingleCommit = !precedingRevision || precedingRevision == lastRevision;
         if (fetchSingleCommit) {
             promise = CommitLog.fetchForSingleRevision(repository, lastRevision).then((commits) => {
@@ -55,7 +54,7 @@ class CommitLogViewer extends ComponentBase {
                 CommitLog.fetchForSingleRevision(repository, precedingRevision).then((precedingCommit) => {
                     if (this._fetchingPromise != promise)
                         return;
-                    this._precedingCommit = null;
+                    this._precedingCommit = precedingCommit[0];
                 })
             ]);
         }