Index: Source/modules/notifications/Notification.cpp |
diff --git a/Source/modules/notifications/Notification.cpp b/Source/modules/notifications/Notification.cpp |
index 5114d8a625d39fef2f6226b9b7ae49de7b2052e3..0c4e5519c69252575a33d20e531e4d30d5b07c92 100644 |
--- a/Source/modules/notifications/Notification.cpp |
+++ b/Source/modules/notifications/Notification.cpp |
@@ -43,8 +43,8 @@ namespace WebCore { |
Notification* Notification::create(ExecutionContext* context, const String& title, const Dictionary& options) |
{ |
- NotificationClient* client = NotificationController::clientFrom(toDocument(context)->frame()); |
- Notification* notification = adoptRefCountedGarbageCollected(new Notification(title, context, client)); |
+ NotificationClient& client = NotificationController::clientFrom(toDocument(context)->frame()); |
+ Notification* notification = adoptRefCountedGarbageCollected(new Notification(title, context, &client)); |
String argument; |
if (options.get("body", argument)) |
@@ -89,7 +89,7 @@ void Notification::show() |
if (!toDocument(executionContext())->page()) |
return; |
- if (NotificationController::from(toDocument(executionContext())->frame())->client()->checkPermission(executionContext()) != NotificationClient::PermissionAllowed) { |
+ if (m_client->checkPermission(executionContext()) != NotificationClient::PermissionAllowed) { |
dispatchErrorEvent(); |
return; |
} |
@@ -164,13 +164,13 @@ const String& Notification::permission(ExecutionContext* context) |
ASSERT(toDocument(context)->page()); |
UseCounter::count(context, UseCounter::NotificationPermission); |
- return permissionString(NotificationController::from(toDocument(context)->frame())->client()->checkPermission(context)); |
+ return permissionString(NotificationController::clientFrom(toDocument(context)->frame()).checkPermission(context)); |
} |
void Notification::requestPermission(ExecutionContext* context, PassOwnPtr<NotificationPermissionCallback> callback) |
{ |
ASSERT(toDocument(context)->page()); |
- NotificationController::from(toDocument(context)->frame())->client()->requestPermission(context, callback); |
+ NotificationController::clientFrom(toDocument(context)->frame()).requestPermission(context, callback); |
} |
bool Notification::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |