Re-work the thread restrictions on the DOM distiller database
In the current implementation, DomDistillerDatabase cannot be deleted on the main thread, instead the user must call ::Destroy(), and then let the database delete itself on its task runner. This is awkward and sort of leaks implementation details out of that class. Second, currently the parts of DomDistillerDatabase on each thread are doing some ad hoc method of checking their thread restrictions. Using ThreadChecker is better, though it loses some flexibility from checking TaskRunner::RunsTasksOnCurrentThread (maybe there should be something like a TaskRunnerChecker for that). Now: 1. no functions are called on DomDistillerDatabase off of the main thread 2. DomDistillerDatabase::LevelDB enforces that function calls and destructor all run on the same thread 3. DomDistillerDatabase can be deleted on the main thread Review URL: https://codereview.chromium.org/56193004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233386 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment