Created attachment 222434 [details] [diff] [review] Implementation in C++
Comment on attachment 222434 [details] [diff] [review] Implementation in C++ There's an extra printf in nsDocNavStartProgressListener.cpp (SetEnabled). I don't think you need to check STATE_IS_REQEUEST or LOAD_DOCUMENT_URI because NOTIFY_STATE_DOCUMNET only fires in those cases. Maybe they could become assertions.
(In reply to comment #1) > Created an attachment (id=222434)  > Implementation in C++ Also, in browser/components/build/Makefile.in, the REQUIRES should probably be in the safebrowsing #ifdef.
Created attachment 222509 [details] [diff] [review] New patch This removes the printf, and makes the check of the load flags an assertion. I kept the state flags check since we do seem to get calls for things other than STATE_IS_REQUEST.
It looks like this patch creates a reference cycle here: + this.progressListener_.callback = this; And, I don't see this cycle being broken anywhere. Are you sure this doesn't leak?
fixed on SAFEBROWSING_20060516_BRANCH if there is a follow-up patch to correct the (possible) leak, then i'll happily land that as well. just let me know.
Created attachment 222548 [details] [diff] [review] fix crash and memory leak Also fix the crash that's causing us to be on fire.
"fix crash and memory leak" fixed on SAFEBROWSING_20060516_BRANCH
fixed on trunk and MOZILLA_1_8_BRANCH