зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1462983 diagnostic: when test_bug607529.html fails JSON.parse operation, print the string that it choked on. r=bz
MozReview-Commit-ID: G8O0GP7VpFQ --HG-- extra : rebase_source : c078e34862b3b21abd91fc8cb66b2ad4aefcc97c
This commit is contained in:
Родитель
1da225dc25
Коммит
754824a1ae
|
@ -50,7 +50,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=607529
|
|||
done = true;
|
||||
}
|
||||
} else {
|
||||
var msg = JSON.parse(e.data);
|
||||
try {
|
||||
var msg = JSON.parse(e.data);
|
||||
} catch (ex) {
|
||||
// Diagnostic for Bug 1462983: if JSON.parse throws, pause to print
|
||||
// the string that it choked on, and then resume throwing the exception.
|
||||
ok(false, "JSON.parse threw, when passed string '" + e.data + "'");
|
||||
throw ex;
|
||||
}
|
||||
if (msg.error) {
|
||||
window.onerror(msg.msg, msg.url, msg.line);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче