Could always pull the useless-UI card for b4 if needed...
We'll relnote this for b4, not gonna hold the beta for it.
This is a regression since beta 3; it is broken in the 0226 nightly, but works in 0225. Based on that, it seems pretty likely that bug 400324 is the culprit, though it's not clear to me what exactly would be causing it. I can confirm that safebrowsing.delayedStartup is being called, but by the time getReportURL is called, this.appContext is null. Ryan?
Created attachment 307549 [details] [diff] [review] Stop caching appContext This patch just reverts the change made in bug 400324 to cache appContext, instead re-getting it in getReportURL. It fixes the problem, but I'm not sure what the motivation was for doing this in the first place, so I'm gonna tag Ryan for a review here, to see if I'm missing something. There don't appear to be any external references to the field, nor any other uses in sb-loader.js.
Created attachment 307557 [details] [diff] [review] simpler, better fix The changed code was running deferredStartup directly via a setTimeout, meaning that it had the wrong 'this'. One-liner to run deferredStartup with the right context.
This means the menu item will be similarly broken in the first two seconds after startup, right? Not a major issue, to be sure, but seems like we should fix it... how about adding a getter that will retrieve appContext lazily, and using it from both deferredStartup and getReportURL? That way we avoid getting the service until deferredStartup in the common case, but things still work OK if the user's really eager :)
Created attachment 307586 [details] [diff] [review] Add lazy-init getter As requested, my liege. If this terrible user exists and does this terrible thing, they will be fine now. The code in getReportURL doesn't rely on the malware/phishing tables being initialize()'d either, so I'm leaving that to deferredStartup.
Comment on attachment 307586 [details] [diff] [review] Add lazy-init getter Might be nice to use an actual getter, and the memoization technique from bug 385809 (e.g. http://mxr.mozilla.org/mozilla/source/toolkit/content/viewZoomOverlay.js#49 ).
Created attachment 307598 [details] [diff] [review] Use getter Good idea - I think your review still holds, but take a look?
Comment on attachment 307598 [details] [diff] [review] Use getter Remove the space in "appContext ()"?
Created attachment 307599 [details] [diff] [review] Spacing correction I'ma go ahead and carry forward your review+
Checking in browser/components/safebrowsing/content/sb-loader.js; /cvsroot/mozilla/browser/components/safebrowsing/content/sb-loader.js,v <-- sb-loader.js new revision: 1.28; previous revision: 1.27 done
wrong bug# in Description on bonsai.
(In reply to comment #13) > wrong bug# in Description on bonsai. bug 421285. Thanks for spotting this.
Verified fixed in Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008050804 Minefield/3.0pre.