Index: Source/modules/notifications/Notification.cpp |
diff --git a/Source/modules/notifications/Notification.cpp b/Source/modules/notifications/Notification.cpp |
index 5114d8a625d39fef2f6226b9b7ae49de7b2052e3..c405fa4dfab36c39186d2459d810be611ea9accd 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) |
@@ -193,7 +193,7 @@ void Notification::stop() |
if (m_asyncRunner) |
m_asyncRunner->stop(); |
- m_client = 0; |
+ m_client = nullptr; |
haraken
2014/06/09 05:21:12
We use 0 for raw pointers. (We use nullptr for Ref
gyuyoung-inactive
2014/06/09 05:38:31
Ok, Fixed.
|
m_state = Closed; |
} |