improve suspicious option detection (#3820)
This commit is contained in:
parent
94f33570e3
commit
36dcfa3e82
|
|
@ -1031,7 +1031,7 @@ function log_suspects(minify_options, component) {
|
||||||
errorln(result.error);
|
errorln(result.error);
|
||||||
} else {
|
} else {
|
||||||
var r = sandbox.run_code(result.code, sandbox.has_toplevel(m));
|
var r = sandbox.run_code(result.code, sandbox.has_toplevel(m));
|
||||||
return sandbox.same_stdout(original_result, r);
|
return !sandbox.same_stdout(uglify_result, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -1056,7 +1056,7 @@ function log_suspects_global(options) {
|
||||||
errorln(result.error);
|
errorln(result.error);
|
||||||
} else {
|
} else {
|
||||||
var r = sandbox.run_code(result.code, sandbox.has_toplevel(m));
|
var r = sandbox.run_code(result.code, sandbox.has_toplevel(m));
|
||||||
return sandbox.same_stdout(original_result, r);
|
return !sandbox.same_stdout(uglify_result, r);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (suspects.length > 0) {
|
if (suspects.length > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user