Title: [139082] trunk/Tools
Revision
139082
Author
[email protected]
Date
2013-01-08 11:00:33 -0800 (Tue, 08 Jan 2013)

Log Message

Dashboard Cleanup: Remove g_hasDoneInitialPageGeneration
https://bugs.webkit.org/show_bug.cgi?id=106254

Remove the global variable g_hasDoneInitialPageGeneration.  It was used
only to figure out if we should call addBuilderLoadErrors during
handleLocationChange, which was called when the loader completed and on
any hash change, but we only ever wanted to call addBuilderLoadErrors
on the initial loader load.  Moved the call of addBuilderLoadErrors to
resourceLoadingComplete rather than handleLocationChange, so now we
only call it when we want to, and the check can go away completely.

Reviewed by Dirk Pranke.

* TestResultServer/static-dashboards/dashboard_base.js:
(addBuilderLoadErrors):
(resourceLoadingComplete):
(handleLocationChange):
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (139081 => 139082)


--- trunk/Tools/ChangeLog	2013-01-08 18:54:35 UTC (rev 139081)
+++ trunk/Tools/ChangeLog	2013-01-08 19:00:33 UTC (rev 139082)
@@ -1,3 +1,24 @@
+2013-01-08  Julie Parent  <[email protected]>
+
+        Dashboard Cleanup: Remove g_hasDoneInitialPageGeneration
+        https://bugs.webkit.org/show_bug.cgi?id=106254
+
+        Remove the global variable g_hasDoneInitialPageGeneration.  It was used
+        only to figure out if we should call addBuilderLoadErrors during
+        handleLocationChange, which was called when the loader completed and on
+        any hash change, but we only ever wanted to call addBuilderLoadErrors
+        on the initial loader load.  Moved the call of addBuilderLoadErrors to
+        resourceLoadingComplete rather than handleLocationChange, so now we
+        only call it when we want to, and the check can go away completely.
+
+        Reviewed by Dirk Pranke.
+
+        * TestResultServer/static-dashboards/dashboard_base.js:
+        (addBuilderLoadErrors):
+        (resourceLoadingComplete):
+        (handleLocationChange):
+        * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+
 2013-01-08  Dominic Mazzoni  <[email protected]>
 
         Add [email protected] to accessibility watchlist.

Modified: trunk/Tools/TestResultServer/static-dashboards/dashboard_base.js (139081 => 139082)


--- trunk/Tools/TestResultServer/static-dashboards/dashboard_base.js	2013-01-08 18:54:35 UTC (rev 139081)
+++ trunk/Tools/TestResultServer/static-dashboards/dashboard_base.js	2013-01-08 19:00:33 UTC (rev 139082)
@@ -462,7 +462,6 @@
     return endsWith(window.location.pathname, 'flakiness_dashboard.html');
 }
 
-var g_hasDoneInitialPageGeneration = false;
 // String of error messages to display to the user.
 var g_errorMessages = '';
 
@@ -502,9 +501,6 @@
 
 function addBuilderLoadErrors()
 {
-    if (g_hasDoneInitialPageGeneration)
-        return;
-
     if (g_buildersThatFailedToLoad.length)
         addError('ERROR: Failed to get data from ' + g_buildersThatFailedToLoad.toString() + '.');
 
@@ -515,6 +511,7 @@
 function resourceLoadingComplete()
 {
     g_resourceLoader = null;
+    addBuilderLoadErrors();
     handleLocationChange();
 }
 
@@ -523,9 +520,6 @@
     if (g_resourceLoader)
         return;
 
-    addBuilderLoadErrors();
-    g_hasDoneInitialPageGeneration = true;
-
     var params = parseParameters();
     var shouldGeneratePage = true;
     if (Object.keys(params).length)

Modified: trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js (139081 => 139082)


--- trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js	2013-01-08 18:54:35 UTC (rev 139081)
+++ trunk/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js	2013-01-08 19:00:33 UTC (rev 139082)
@@ -599,7 +599,6 @@
 
 test('addBuilderLoadErrors', 1, function() {
     clearErrors();
-    g_hasDoneInitialPageGeneration = false;
     g_buildersThatFailedToLoad = ['builder1', 'builder2'];
     g_staleBuilders = ['staleBuilder1'];
     addBuilderLoadErrors();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to