Closed
Bug 524548
Opened 15 years ago
Closed 11 years ago
Safebrowsing should shut down sooner if possible
Categories
(Toolkit :: Safe Browsing, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bent.mozilla, Unassigned)
Details
Attachments
(1 file)
5.03 KB,
text/plain
|
Details |
On my windows VM sometimes shutdown takes forever. When I break I see that the main thread is waiting to join the safebrowsing thread, but it's still processing lots of updates and using sqlite extensively. I don't know anything about the architecture here but would it be possible to interrupt this processing and run the updates later? I'll attach the stacks from both threads.
Comment 1•15 years ago
|
||
I think
Comment 2•15 years ago
|
||
whoops, I think if we switch the mozStorage to executeAsync, we can cancel the current query? is that right sdwilsh?
Comment 3•15 years ago
|
||
I'm wondering if you would create an observer that detects XPCOM shutdown each time you run the db update. If you detect XPCOM shutdown, you call reset() on the statement. Would that rollback the transaction, which would make url-classifier start over on the next startup?
Comment 4•15 years ago
|
||
Looks like there is a "cancelUpdate" call in the dbService: http://mxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp#3289
Comment 5•15 years ago
|
||
You could do that with executeAsync, but in this case it doesn't matter. You'd just want to stop processing any updates, and do it at next startup.
Comment 6•15 years ago
|
||
Looks like there is an observer registered for xpcom-shutdown-threads http://mxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp#3962 Would we need to add another observer for 'xpcom-shutdown' explicitly?
Comment 7•11 years ago
|
||
The old sqlite DB is gone, I do hope the new one shuts down faster. :)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•10 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•