mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 662403: Fix reftest-analyzer and leak-gauge to not use removed nsIDOMFile methods. r=bz
DONTBUILD
This commit is contained in:
parent
4193a686a0
commit
090fb7c81d
@ -191,23 +191,28 @@ function fileentry_changed() {
|
|||||||
show_phase("loading");
|
show_phase("loading");
|
||||||
var input = ID("fileentry");
|
var input = ID("fileentry");
|
||||||
var files = input.files;
|
var files = input.files;
|
||||||
var log = null;
|
|
||||||
if (files.length > 0) {
|
if (files.length > 0) {
|
||||||
// Only handle the first file; don't handle multiple selection.
|
// Only handle the first file; don't handle multiple selection.
|
||||||
// The parts of the log we care about are ASCII-only. Since we
|
// The parts of the log we care about are ASCII-only. Since we
|
||||||
// can ignore lines we don't care about, best to read in as
|
// can ignore lines we don't care about, best to read in as
|
||||||
// iso-8859-1, which guarantees we don't get decoding errors.
|
// iso-8859-1, which guarantees we don't get decoding errors.
|
||||||
log = files[0].getAsText("iso-8859-1");
|
var fileReader = new FileReader();
|
||||||
|
fileReader.onload = function(e) {
|
||||||
|
var log = null;
|
||||||
|
|
||||||
|
log = e.target.result;
|
||||||
|
|
||||||
|
if (log)
|
||||||
|
process_log(log);
|
||||||
|
else
|
||||||
|
show_phase("entry");
|
||||||
|
}
|
||||||
|
fileReader.readAsText(files[0], "iso-8859-1");
|
||||||
}
|
}
|
||||||
// So the user can process the same filename again (after
|
// So the user can process the same filename again (after
|
||||||
// overwriting the log), clear the value on the form input so we
|
// overwriting the log), clear the value on the form input so we
|
||||||
// will always get an onchange event.
|
// will always get an onchange event.
|
||||||
input.value = "";
|
input.value = "";
|
||||||
|
|
||||||
if (log)
|
|
||||||
process_log(log);
|
|
||||||
else
|
|
||||||
show_phase("entry");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function log_pasted() {
|
function log_pasted() {
|
||||||
|
@ -48,7 +48,18 @@ pre.output { border: medium solid; padding: 1em; margin: 1em; }
|
|||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function runfile(file) {
|
function runFile(file) {
|
||||||
|
var result = "Results of processing log " + file.fileName + " :\n";
|
||||||
|
|
||||||
|
var fileReader = new FileReader();
|
||||||
|
fileReader.onload = function(e)
|
||||||
|
{
|
||||||
|
runContents(result, e.target.result);
|
||||||
|
}
|
||||||
|
fileReader.readAsText(file, "iso-8859-1");
|
||||||
|
}
|
||||||
|
|
||||||
|
function runContents(result, contents) {
|
||||||
// A hash of objects (keyed by the first word of the line in the log)
|
// A hash of objects (keyed by the first word of the line in the log)
|
||||||
// that have two public methods, handle_line and dump (to be called using
|
// that have two public methods, handle_line and dump (to be called using
|
||||||
// call, above), along with any private data they need.
|
// call, above), along with any private data they need.
|
||||||
@ -236,9 +247,6 @@ function runfile(file) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var result = "Results of processing log " + file.fileName + " :\n";
|
|
||||||
|
|
||||||
var contents = file.getAsText("iso-8859-1");
|
|
||||||
var lines = contents.split(/[\r\n]+/);
|
var lines = contents.split(/[\r\n]+/);
|
||||||
for (var j in lines) {
|
for (var j in lines) {
|
||||||
var line = lines[j];
|
var line = lines[j];
|
||||||
|
Loading…
Reference in New Issue
Block a user