Bug 1312690: Remove now-useless .matches() call from tryInject. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Tue, 01 Nov 2016 16:53:55 -0700
changeset 432818 a8b91bd31af109b3ac109b8a9125e0dc42b05153
parent 432817 0f1d3bad5005996f8e6edf3a27d1d214120b5976
child 432819 559bb54fb330faf8bfa6b03b01be509e86c3eab9
push id34435
push usermaglione.k@gmail.com
push dateWed, 02 Nov 2016 20:58:46 +0000
reviewersaswan
bugs1312690
milestone52.0a1
Bug 1312690: Remove now-useless .matches() call from tryInject. r?aswan MozReview-Commit-ID: 9EVWJFSe1tU
toolkit/components/extensions/ExtensionContent.jsm
--- 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) {