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

Unified Diff: Source/modules/notifications/NotificationController.cpp

Issue 268353004: NotificationController::clientFrom() should return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 | « Source/modules/notifications/NotificationController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/notifications/NotificationController.cpp
diff --git a/Source/modules/notifications/NotificationController.cpp b/Source/modules/notifications/NotificationController.cpp
index 47abc467407a14ebba2d83382611c3825a46e899..5f4796ff7fd9af4c73c3b3a9029d7acc4c5f8b63 100644
--- a/Source/modules/notifications/NotificationController.cpp
+++ b/Source/modules/notifications/NotificationController.cpp
@@ -45,11 +45,11 @@ PassOwnPtr<NotificationController> NotificationController::create(PassOwnPtr<Not
return adoptPtr(new NotificationController(client));
}
-NotificationClient* NotificationController::clientFrom(LocalFrame* frame)
+NotificationClient& NotificationController::clientFrom(LocalFrame* frame)
{
- if (NotificationController* controller = NotificationController::from(frame))
- return controller->client();
- return 0;
+ NotificationController* controller = NotificationController::from(frame);
+ ASSERT(controller);
+ return controller->client();
}
const char* NotificationController::supplementName()
« no previous file with comments | « Source/modules/notifications/NotificationController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698