Bug 1312690: Remove now-useless .matches() call from tryInject. r?aswan
MozReview-Commit-ID: 9EVWJFSe1tU
--- a/toolkit/components/extensions/ExtensionContent.jsm
+++ b/toolkit/components/extensions/ExtensionContent.jsm
@@ -204,21 +204,16 @@ Script.prototype = {
* given state exactly matches the state that triggered the
* change.
* @param {string} when
* The document's current load state, or if triggered by a
* document state change, the new document state that triggered
* the injection.
*/
tryInject(window, sandbox, shouldRun, when) {
- if (!this.matches(window)) {
- this.deferred.reject({message: "No matching window"});
- return;
- }
-
if (shouldRun("document_start")) {
let winUtils = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
let {cssURLs} = this;
if (cssURLs.length > 0) {
let method = this.remove_css ? winUtils.removeSheetUsingURIString : winUtils.loadSheetUsingURIString;
for (let url of cssURLs) {