Commit db37e697 authored by aroben@apple.com's avatar aroben@apple.com

Roll out r80848

It was accidentally committed.

* BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js:
(LeaksViewer._loadLeaksFromURL):

git-svn-id: svn://svn.chromium.org/blink/trunk@80851 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent de345892
...@@ -88,64 +88,15 @@ var LeaksViewer = { ...@@ -88,64 +88,15 @@ var LeaksViewer = {
this.url = url; this.url = url;
this.loading = true; this.loading = true;
if (/\.txt$/.test(this.url)) { var self = this;
// We're loading a single leaks file. getResource(url, function(xhr) {
var worker = new Worker("Worker.js");
var self = this; worker.onmessage = function(e) {
getResource(url, function(xhr) { ProfilerAgent.profileReady(e.data);
var worker = new Worker("Worker.js"); self.loading = false;
worker.onmessage = function(e) { };
ProfilerAgent.profileReady(e.data); worker.postMessage(xhr.responseText);
self.loading = false; });
};
worker.postMessage(xhr.responseText);
});
} else {
function mergeProfiles(a, b) {
a.selfTime += b.selfTime;
a.totalTime += b.totalTime;
b.children.forEach(function(child) {
var aChild = a.childrenByName[child.functionName];
if (aChild) {
mergeProfiles(aChild, child);
return;
}
a.children.push(child);
a.childrenByName[child.functionName] = child;
});
}
// Assume we're loading a results directory. Try to find all the leaks files in it.
var self = this;
getResource(url, function(xhr) {
var root = document.createElement("html");
root.innerHTML = xhr.responseText;
// Strip off everything after the last /.
var baseURL = url.substring(0, url.lastIndexOf("/") + 1);
var urls = Array.prototype.map.call(root.querySelectorAll("tr.file > td > a[href$='-leaks.txt']"), function(link) { return baseURL + link.getAttribute("href"); });
var pendingProfilesCount = urls.length;
var profile;
urls.forEach(function(url) {
getResource(url, function(xhr) {
var worker = new Worker("Worker.js");
worker.onmessage = function(e) {
if (profile)
mergeProfiles(profile, e.data);
else
profile = e.data;
if (--pendingProfilesCount)
return;
ProfilerAgent.profileReady(profile);
self.loading = false;
};
worker.postMessage(xhr.responseText);
});
});
});
}
}, },
_loadingStatusChanged: function() { _loadingStatusChanged: function() {
......
2011-03-11 Adam Roben <aroben@apple.com>
Roll out r80848
It was accidentally committed.
* BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js:
(LeaksViewer._loadLeaksFromURL):
2011-03-11 Tony Chang <tony@chromium.org> 2011-03-11 Tony Chang <tony@chromium.org>
Reviewed by Ojan Vafai. Reviewed by Ojan Vafai.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment