Bug 1312690: Remove now-useless .matches() call from tryInject. r=aswan
authorKris Maglione <maglione.k@gmail.com>
Tue, 01 Nov 2016 16:53:55 -0700
changeset 363677 12ef342043e97b556c794efc3cf6f2f4bdf46a5d
parent 363676 11f20c7b030cb1e08f191bc29b520162d4a9971c
child 363678 5e3d6fb19a2b91400d3baa26c868da621df8e700
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1312690
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
@@ -209,21 +209,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) {