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

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

Issue 2706453002: [Presentation API] return valid WebPresentationConnection object in PresentationReceiver (Closed)
Patch Set: resolve code review comments from Derek Created 3 years, 10 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
Index: third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
index bbefd948fc6eee8837c51d4f2f38aa304c359274..14aea2196ba1860d7528fa487ad86f398c4263c5 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
@@ -49,14 +49,15 @@ WebPresentationConnection* PresentationReceiver::onReceiverConnectionAvailable(
// receiver.connectionList property not accessed
if (!m_connectionListProperty)
- return nullptr;
+ return connection;
if (m_connectionListProperty->getState() ==
- ScriptPromisePropertyBase::Pending)
+ ScriptPromisePropertyBase::Pending) {
m_connectionListProperty->resolve(m_connectionList);
- else if (m_connectionListProperty->getState() ==
- ScriptPromisePropertyBase::Resolved)
+ } else if (m_connectionListProperty->getState() ==
+ ScriptPromisePropertyBase::Resolved) {
m_connectionList->dispatchConnectionAvailableEvent(connection);
+ }
return connection;
}

Powered by Google App Engine
This is Rietveld 408576698