Bug 340866: Anti-phishing only works on the last opened window (fails otherwise)

r=brettw,a=bryner
This commit is contained in:
tony%ponderer.org 2006-06-13 05:37:32 +00:00
parent 3f649fb148
commit 56d35d22bc

View File

@ -120,7 +120,7 @@ function PROT_PhishingWarden() {
// hook up our browser listener // hook up our browser listener
this.progressListener_ = Cc["@mozilla.org/browser/safebrowsing/navstartlistener;1"] this.progressListener_ = Cc["@mozilla.org/browser/safebrowsing/navstartlistener;1"]
.getService(Ci.nsIDocNavStartProgressListener); .createInstance(Ci.nsIDocNavStartProgressListener);
this.progressListener_.callback = this; this.progressListener_.callback = this;
this.progressListener_.enabled = this.phishWardenEnabled_; this.progressListener_.enabled = this.phishWardenEnabled_;
// ms to wait after a request has started before firing JS callback // ms to wait after a request has started before firing JS callback
@ -436,7 +436,10 @@ PROT_PhishingWarden.prototype.maybeLocateProblem_ = function(request) {
* test URLs * test URLs
*/ */
PROT_PhishingWarden.prototype.isBlacklistTestURL = function(url) { PROT_PhishingWarden.prototype.isBlacklistTestURL = function(url) {
return kTestUrls[url]; // Explicitly check for URL so we don't get JS warnings in strict mode.
if (kTestUrls[url])
return true;
return false;
} }
/** /**