I see two major issue in this check. The first one, it uses `this.domain` string to compose a regexp. The second one, it uses `urlStr` to test it. Using `this.domain` as is, makes all the string characters behaves like regexp metacharacters, therefore a match pattern like `"*.sam.ple.com"` match `"http://ex.samAple.com"` too. The second issue, using `urlStr` will fails to match URLs like `"http://ex.sample.com/foo.html"` with `"*.sample.com"` as pattern, because the slice will start from the end of the URL, file – or path – included. 

So my suggestion is use the `url.host` like before, instead of `urlStr`, with some few addition. Something like:

    if (this.domain && url.host &&
     (url.host === this.domain || url.host.slice(-this.domain.length - 1) === "." + this.domain))

Should cover all the issues listed above and in bug 856913.