Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit 8562f70

Browse files
committed
avoid potential double execution of firstRetrieveHandler (because mutations observer)
1 parent aca35e4 commit 8562f70

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/js/contentscript-end.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ var messager = vAPI.messaging.channel('contentscript-end.js');
7979
},
8080
retrieveHandler
8181
);
82+
// https://github.com/gorhill/uBlock/issues/452
83+
// There is only one first..
84+
retrieveHandler = otherRetrieveHandler;
8285
} else {
8386
otherRetrieveHandler(null);
8487
}
@@ -111,10 +114,6 @@ var messager = vAPI.messaging.channel('contentscript-end.js');
111114
}
112115
}
113116
}
114-
115-
// There is only one first..
116-
retrieveHandler = otherRetrieveHandler;
117-
118117
// Flush dead code from memory (does this work?)
119118
firstRetrieveHandler = null;
120119

0 commit comments

Comments
 (0)