Remove non-nestable / deferred tasks. |
||
Issue descriptionWe should investigate if there are enough valid use cases to justify the complexity of deferred tasks in MessageLoop/SequenceManager. If not, we should remove non-nestable task posting and replace it with local complexity at those callsites where nesting needs to be prevented (e.g. detect if nested + repost with a small delay).
,
Aug 22
There are tons of overrides of PostNonNestableDelayedTask(), but I believe that the 4 only calls to this method are in: https://cs.chromium.org/chromium/src/media/mojo/services/cdm_service.cc?l=52&rcl=ba40c8a2713097169e750be30fbe3f17159bd0d6 https://cs.chromium.org/chromium/src/chromeos/accelerometer/accelerometer_reader.cc?l=340&rcl=ba40c8a2713097169e750be30fbe3f17159bd0d6 https://cs.chromium.org/chromium/src/chrome/browser/chromeos/login/screens/update_screen.cc?l=531&rcl=ba40c8a2713097169e750be30fbe3f17159bd0d6 https://cs.chromium.org/chromium/src/chrome/browser/chromeos/printing/fake_cups_print_job_manager.cc?l=41&rcl=ba40c8a2713097169e750be30fbe3f17159bd0d6
,
Aug 22
Fdoray@, there're a bunch of calls to SequencedTaskRunner::PostNonNestableTask too
,
Aug 22
There are several places where non-nestable tasks are used to work around lifetime issues: https://cs.chromium.org/chromium/src/content/browser/frame_host/interstitial_page_impl.cc?l=298 https://cs.chromium.org/chromium/src/content/renderer/render_widget.cc?l=794 I think that now it should be possible to rewrite them cleanly with using nested observers (maybe we should provide a helper class for this).
,
Aug 22
,
Sep 10
One more thing: DeleteSoon/ReleaseSoon tasks are currently also NonNestable: https://cs.chromium.org/chromium/src/base/sequenced_task_runner.cc?type=cs&sq=package:chromium&g=0&l=23 |
||
►
Sign in to add a comment |
||
Comment 1 by gab@chromium.org
, Aug 21