Help > Report Web Forgery..." does nothing; "this.appContext is null. b=420667 r=gavin a=blocking-firefox3 (beltzner)

This commit is contained in:
johnath@mozilla.com 2008-03-06 06:05:34 -08:00
parent f9cf933c04
commit 95c0047d32

View File

@ -38,13 +38,13 @@ var safebrowsing = {
appContext: null,
startup: function() {
setTimeout(safebrowsing.deferredStartup, 2000);
setTimeout(function() {
safebrowsing.deferredStartup();
}, 2000);
window.removeEventListener("load", safebrowsing.startup, false);
},
deferredStartup: function() {
this.appContext = Cc["@mozilla.org/safebrowsing/application;1"].
getService().wrappedJSObject;
this.appContext.initialize();
},
@ -56,6 +56,15 @@ var safebrowsing = {
else
broadcaster.disabled = true;
},
/**
* Lazy init getter for appContext
*/
get appContext() {
delete this.appContext;
return this.appContext = Cc["@mozilla.org/safebrowsing/application;1"]
.getService().wrappedJSObject;
},
/**
* Used to report a phishing page or a false positive