Use std::unique_ptr in m_taskTimer of Notification class
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 01:16:18 +0000 (01:16 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 01:16:18 +0000 (01:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132544

Reviewed by Andreas Kling.

No new tests, no behavior change.

* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
* Modules/notifications/Notification.h: Use std::unique_ptr instead of OwnPtr.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168252 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/notifications/Notification.cpp
Source/WebCore/Modules/notifications/Notification.h

index 264f4ce..7ef0d07 100644 (file)
@@ -1,3 +1,16 @@
+2014-05-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Use std::unique_ptr in m_taskTimer of Notification class
+        https://bugs.webkit.org/show_bug.cgi?id=132544
+
+        Reviewed by Andreas Kling.
+
+        No new tests, no behavior change.
+
+        * Modules/notifications/Notification.cpp:
+        (WebCore::Notification::Notification):
+        * Modules/notifications/Notification.h: Use std::unique_ptr instead of OwnPtr.
+
 2014-05-04  Tim Horton  <timothy_horton@apple.com>
 
         Long hangs under IOSurfacePool::evict
index 12e3979..e9cb035 100644 (file)
@@ -84,7 +84,7 @@ Notification::Notification(ScriptExecutionContext& context, const String& title)
     : ActiveDOMObject(&context)
     , m_title(title)
     , m_state(Idle)
-    , m_taskTimer(adoptPtr(new Timer<Notification>(this, &Notification::taskTimerFired)))
+    , m_taskTimer(std::make_unique<Timer<Notification>>(this, &Notification::taskTimerFired))
 {
     m_notificationCenter = DOMWindowNotifications::webkitNotifications(toDocument(context).domWindow());
     
index 2feffe7..b9ac024 100644 (file)
@@ -40,7 +40,6 @@
 #include "SharedBuffer.h"
 #include "TextDirection.h"
 #include "ThreadableLoaderClient.h"
-#include <wtf/OwnPtr.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -181,7 +180,7 @@ private:
     RefPtr<NotificationCenter> m_notificationCenter;
 
 #if ENABLE(NOTIFICATIONS)
-    OwnPtr<Timer<Notification>> m_taskTimer;
+    std::unique_ptr<Timer<Notification>> m_taskTimer;
 #endif
 };