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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp

Issue 2661053002: [Presentation API] Fix race condition in which state change is lost. (Closed)
Patch Set: Created 3 years, 11 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_service_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
index be94c78b5cbe27f3800a4a7eeafc31a025dc6703..404deb1c4ac2521ab549785626876551b5e39f38 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
@@ -200,6 +200,9 @@ PresentationConnection* PresentationConnection::take(
createSameThreadTask(&PresentationConnection::dispatchEventAsync,
wrapPersistent(request), wrapPersistent(event)));
+ // Fire onconnect event asynchronously, after onconnectionavailable.
+ connection->didChangeState(WebPresentationConnectionState::Connected);
+
return connection;
}
« no previous file with comments | « content/browser/presentation/presentation_service_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698