Fix unsafe "instanceof" negations

https://github.com/MoonchildProductions/Pale-Moon/pull/1173
This commit is contained in:
janekptacijarabaci 2018-05-02 06:57:57 +02:00 committed by Roy Tam
commit b56d147095
17 changed files with 19 additions and 28 deletions

View file

@ -838,7 +838,7 @@
* implementation.
*/
File.DirectoryIterator.Entry.toMsg = function toMsg(value) {
if (!value instanceof File.DirectoryIterator.Entry) {
if (!(value instanceof File.DirectoryIterator.Entry)) {
throw new TypeError("parameter of " +
"File.DirectoryIterator.Entry.toMsg must be a " +
"File.DirectoryIterator.Entry");
@ -905,7 +905,7 @@
* is asymmetric and returns an object with a different implementation.
*/
File.Info.toMsg = function toMsg(stat) {
if (!stat instanceof File.Info) {
if (!(stat instanceof File.Info)) {
throw new TypeError("parameter of File.Info.toMsg must be a File.Info");
}
let serialized = {};