Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3512)

Unified Diff: content/renderer/presentation/presentation_dispatcher.cc

Issue 2397453002: Asynchronously resolve getAvailability callbacks. (Closed)
Patch Set: fix compile Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/presentation/presentation_browsertest.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/presentation/presentation_dispatcher.cc
diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc
index a0b3125568cfa47217c6424ab470549d34f99c92..e0f857e4f63069ad3f09e923b4536617d81888f6 100644
--- a/content/renderer/presentation/presentation_dispatcher.cc
+++ b/content/renderer/presentation/presentation_dispatcher.cc
@@ -255,8 +255,11 @@ void PresentationDispatcher::getAvailability(
DCHECK(status);
if (status->listening_state == ListeningState::ACTIVE) {
- callbacks->onSuccess(status->last_known_availability);
- delete callbacks;
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE,
+ base::Bind(&blink::WebPresentationAvailabilityCallbacks::onSuccess,
+ base::Owned(callbacks),
+ status->last_known_availability));
return;
}
« no previous file with comments | « content/browser/presentation/presentation_browsertest.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698