Changeset 94579 in webkit


Ignore:
Timestamp:
Sep 6, 2011 11:00:25 AM (13 years ago)
Author:
abarth@webkit.org
Message:

garden-o-matic's base.probe generates spam in the JavaScript console
https://bugs.webkit.org/show_bug.cgi?id=67622

Reviewed by Dimitri Glazkov.

Now that we have CORS set up on the buildbot, we can use XMLHttpRequest
instead of HTMLScriptElement to test whether results exist. This
reduces the console.log spam and saves bandwidth because we can use a
HEAD request instead of a GET request.

  • BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/net.js:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/net.js

    r93259 r94579  
    3434net.probe = function(url, options)
    3535{
    36     var scriptElement = document.createElement('script');
    37     scriptElement.addEventListener('load', function() {
    38         $(scriptElement).detach();
    39         if (options.success)
    40             options.success.call();
    41     }, false);
    42     scriptElement.addEventListener('error', function() {
    43         $(scriptElement).detach();
    44         if (options.error)
    45             options.error.call();
    46     }, false);
    47     scriptElement.src = url;
    48     document.head.appendChild(scriptElement);
     36    $.ajax({
     37        url: url,
     38        type: 'HEAD',
     39        success: function() {
     40            if (options.success)
     41                options.success.call();
     42        },
     43        error: function() {
     44            if (options.error)
     45                options.error.call();
     46        },
     47    });
    4948};
    5049
  • trunk/Tools/ChangeLog

    r94540 r94579  
     12011-09-06  Adam Barth  <abarth@webkit.org>
     2
     3        garden-o-matic's base.probe generates spam in the JavaScript console
     4        https://bugs.webkit.org/show_bug.cgi?id=67622
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        Now that we have CORS set up on the buildbot, we can use XMLHttpRequest
     9        instead of HTMLScriptElement to test whether results exist.  This
     10        reduces the console.log spam and saves bandwidth because we can use a
     11        HEAD request instead of a GET request.
     12
     13        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/net.js:
     14
    1152011-09-05  Adam Barth  <abarth@webkit.org>
    216
Note: See TracChangeset for help on using the changeset viewer.