Title: [164274] trunk/Source/WebCore
Revision
164274
Author
commit-qu...@webkit.org
Date
2014-02-17 23:17:24 -0800 (Mon, 17 Feb 2014)

Log Message

Move PublicURLMansger to std::unique_ptr.
https://bugs.webkit.org/show_bug.cgi?id=128891

Patch by Sangho Kim <thomas....@lge.com> on 2014-02-17
Reviewed by Anders Carlsson.

Use std::unique_ptr and std::make_unique in place of PassOwnPtr and adoptPtr in the PublicURLManager

* dom/ScriptExecutionContext.h:
* html/PublicURLManager.cpp:
(WebCore::PublicURLManager::create):
* html/PublicURLManager.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (164273 => 164274)


--- trunk/Source/WebCore/ChangeLog	2014-02-18 06:51:36 UTC (rev 164273)
+++ trunk/Source/WebCore/ChangeLog	2014-02-18 07:17:24 UTC (rev 164274)
@@ -1,3 +1,17 @@
+2014-02-17  Sangho Kim  <thomas....@lge.com>
+
+        Move PublicURLMansger to std::unique_ptr.
+        https://bugs.webkit.org/show_bug.cgi?id=128891
+
+        Reviewed by Anders Carlsson.
+
+        Use std::unique_ptr and std::make_unique in place of PassOwnPtr and adoptPtr in the PublicURLManager
+
+        * dom/ScriptExecutionContext.h:
+        * html/PublicURLManager.cpp:
+        (WebCore::PublicURLManager::create):
+        * html/PublicURLManager.h:
+
 2014-02-17  Ricky Mondello  <rmonde...@apple.com>
 
         Expose a way to clear cookies modified after a given date

Modified: trunk/Source/WebCore/dom/ScriptExecutionContext.h (164273 => 164274)


--- trunk/Source/WebCore/dom/ScriptExecutionContext.h	2014-02-18 06:51:36 UTC (rev 164273)
+++ trunk/Source/WebCore/dom/ScriptExecutionContext.h	2014-02-18 07:17:24 UTC (rev 164274)
@@ -215,7 +215,7 @@
     bool m_activeDOMObjectsAreStopped;
 
 #if ENABLE(BLOB)
-    OwnPtr<PublicURLManager> m_publicURLManager;
+    std::unique_ptr<PublicURLManager> m_publicURLManager;
 #endif
 
 #if ENABLE(SQL_DATABASE)

Modified: trunk/Source/WebCore/html/PublicURLManager.cpp (164273 => 164274)


--- trunk/Source/WebCore/html/PublicURLManager.cpp	2014-02-18 06:51:36 UTC (rev 164273)
+++ trunk/Source/WebCore/html/PublicURLManager.cpp	2014-02-18 07:17:24 UTC (rev 164274)
@@ -35,11 +35,11 @@
 
 namespace WebCore {
 
-PassOwnPtr<PublicURLManager> PublicURLManager::create(ScriptExecutionContext* context)
+std::unique_ptr<PublicURLManager> PublicURLManager::create(ScriptExecutionContext* context)
 {
-    OwnPtr<PublicURLManager> publicURLManager(adoptPtr(new PublicURLManager(context)));
+    auto publicURLManager = std::make_unique<PublicURLManager>(context);
     publicURLManager->suspendIfNeeded();
-    return publicURLManager.release();
+    return publicURLManager;
 }
 
 PublicURLManager::PublicURLManager(ScriptExecutionContext* context)

Modified: trunk/Source/WebCore/html/PublicURLManager.h (164273 => 164274)


--- trunk/Source/WebCore/html/PublicURLManager.h	2014-02-18 06:51:36 UTC (rev 164273)
+++ trunk/Source/WebCore/html/PublicURLManager.h	2014-02-18 07:17:24 UTC (rev 164274)
@@ -28,10 +28,9 @@
 
 #if ENABLE(BLOB)
 #include "ActiveDOMObject.h"
+#include <memory>
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -45,15 +44,16 @@
 class PublicURLManager : public ActiveDOMObject {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    static PassOwnPtr<PublicURLManager> create(ScriptExecutionContext*);
+    explicit PublicURLManager(ScriptExecutionContext*);
 
+    static std::unique_ptr<PublicURLManager> create(ScriptExecutionContext*);
+
     void registerURL(SecurityOrigin*, const URL&, URLRegistrable*);
     void revoke(const URL&);
 
     // ActiveDOMObject interface.
     virtual void stop() override;
 private:
-    PublicURLManager(ScriptExecutionContext*);
     
     typedef HashSet<String> URLSet;
     typedef HashMap<URLRegistry*, URLSet > RegistryURLMap;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to