forked from mirrors/gecko-dev
Bug 1817347 - Prevent jorendb from spewing out enormous strings r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D170146
This commit is contained in:
parent
512a9a280e
commit
3c9f04d7fb
1 changed files with 5 additions and 1 deletions
|
|
@ -62,7 +62,11 @@ function dvToString(v) {
|
|||
if (typeof(v) === 'object' && v !== null) {
|
||||
return `[object ${v.class}]`;
|
||||
}
|
||||
return uneval(v);
|
||||
const s = uneval(v);
|
||||
if (s.length > 400) {
|
||||
return s.substr(0, 400) + "...<" + (s.length - 400) + " more bytes>...";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
function summaryObject(dv) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue