Remove all uses of PassRefPtr in WebCore/inspector
authorgyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Sep 2015 05:40:02 +0000 (05:40 +0000)
committergyuyoung.kim@webkit.org <gyuyoung.kim@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Sep 2015 05:40:02 +0000 (05:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149156

Reviewed by Darin Adler.

* inspector/DOMEditor.cpp:
(WebCore::DOMEditor::InsertBeforeAction::InsertBeforeAction):
(WebCore::DOMEditor::ReplaceChildNodeAction::ReplaceChildNodeAction):
(WebCore::DOMEditor::insertBefore):
(WebCore::DOMEditor::replaceChild):
* inspector/DOMEditor.h:
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::removeChildAndMoveToNew):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightSelector):
* inspector/InspectorDatabaseAgent.cpp:
(WebCore::InspectorDatabaseAgent::didOpenDatabase):
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorDatabaseInstrumentation.h:
* inspector/InspectorDatabaseResource.h:
(WebCore::InspectorDatabaseResource::setDatabase):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::create):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::highlightNodeList):
* inspector/InspectorOverlay.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::sharedBufferContent):
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::startProfiling):
(WebCore::stopProfiling):
(WebCore::InspectorTimelineAgent::stopFromConsole):
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerResource.h:
(WebCore::InspectorWorkerResource::create):
* inspector/InstrumentingAgents.h:
* inspector/NetworkResourcesData.cpp:
(WebCore::createOtherResourceTextDecoder):
(WebCore::NetworkResourcesData::addResourceSharedBuffer):
* inspector/NetworkResourcesData.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::createQuad):
* inspector/WebInjectedScriptHost.h:
* inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
* inspector/WebInjectedScriptManager.h:

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

27 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/DOMEditor.cpp
Source/WebCore/inspector/DOMEditor.h
Source/WebCore/inspector/DOMPatchSupport.cpp
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/inspector/InspectorDatabaseAgent.cpp
Source/WebCore/inspector/InspectorDatabaseAgent.h
Source/WebCore/inspector/InspectorDatabaseInstrumentation.h
Source/WebCore/inspector/InspectorDatabaseResource.h
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorLayerTreeAgent.h
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/inspector/InspectorOverlay.h
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorPageAgent.h
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/InspectorWorkerResource.h
Source/WebCore/inspector/InstrumentingAgents.h
Source/WebCore/inspector/NetworkResourcesData.cpp
Source/WebCore/inspector/NetworkResourcesData.h
Source/WebCore/inspector/TimelineRecordFactory.cpp
Source/WebCore/inspector/WebInjectedScriptHost.h
Source/WebCore/inspector/WebInjectedScriptManager.cpp
Source/WebCore/inspector/WebInjectedScriptManager.h

index b952ced..8ad1405 100644 (file)
@@ -1,3 +1,57 @@
+2015-09-16  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
+
+        Remove all uses of PassRefPtr in WebCore/inspector
+        https://bugs.webkit.org/show_bug.cgi?id=149156
+
+        Reviewed by Darin Adler.
+
+        * inspector/DOMEditor.cpp:
+        (WebCore::DOMEditor::InsertBeforeAction::InsertBeforeAction):
+        (WebCore::DOMEditor::ReplaceChildNodeAction::ReplaceChildNodeAction):
+        (WebCore::DOMEditor::insertBefore):
+        (WebCore::DOMEditor::replaceChild):
+        * inspector/DOMEditor.h:
+        * inspector/DOMPatchSupport.cpp:
+        (WebCore::DOMPatchSupport::removeChildAndMoveToNew):
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::highlightSelector):
+        * inspector/InspectorDatabaseAgent.cpp:
+        (WebCore::InspectorDatabaseAgent::didOpenDatabase):
+        * inspector/InspectorDatabaseAgent.h:
+        * inspector/InspectorDatabaseInstrumentation.h:
+        * inspector/InspectorDatabaseResource.h:
+        (WebCore::InspectorDatabaseResource::setDatabase):
+        * inspector/InspectorFrontendHost.cpp:
+        (WebCore::FrontendMenuProvider::create):
+        * inspector/InspectorInstrumentation.cpp:
+        (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
+        * inspector/InspectorLayerTreeAgent.h:
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::InspectorOverlay::highlightNodeList):
+        * inspector/InspectorOverlay.h:
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::sharedBufferContent):
+        * inspector/InspectorPageAgent.h:
+        * inspector/InspectorResourceAgent.cpp:
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::startProfiling):
+        (WebCore::stopProfiling):
+        (WebCore::InspectorTimelineAgent::stopFromConsole):
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/InspectorWorkerResource.h:
+        (WebCore::InspectorWorkerResource::create):
+        * inspector/InstrumentingAgents.h:
+        * inspector/NetworkResourcesData.cpp:
+        (WebCore::createOtherResourceTextDecoder):
+        (WebCore::NetworkResourcesData::addResourceSharedBuffer):
+        * inspector/NetworkResourcesData.h:
+        * inspector/TimelineRecordFactory.cpp:
+        (WebCore::createQuad):
+        * inspector/WebInjectedScriptHost.h:
+        * inspector/WebInjectedScriptManager.cpp:
+        (WebCore::WebInjectedScriptManager::WebInjectedScriptManager):
+        * inspector/WebInjectedScriptManager.h:
+
 2015-09-16  Brady Eidson  <beidson@apple.com>
 
         Have window.indexedDB.open return an IDBOpenDBRequest.
index 08b8545..d242da1 100644 (file)
@@ -79,10 +79,10 @@ private:
 class DOMEditor::InsertBeforeAction : public InspectorHistory::Action {
     WTF_MAKE_NONCOPYABLE(InsertBeforeAction);
 public:
-    InsertBeforeAction(Node* parentNode, PassRefPtr<Node> node, Node* anchorNode)
+    InsertBeforeAction(Node* parentNode, RefPtr<Node>&& node, Node* anchorNode)
         : InspectorHistory::Action("InsertBefore")
         , m_parentNode(parentNode)
-        , m_node(node)
+        , m_node(WTF::move(node))
         , m_anchorNode(anchorNode)
     {
     }
@@ -281,10 +281,10 @@ private:
 class DOMEditor::ReplaceChildNodeAction : public InspectorHistory::Action {
     WTF_MAKE_NONCOPYABLE(ReplaceChildNodeAction);
 public:
-    ReplaceChildNodeAction(Node* parentNode, PassRefPtr<Node> newNode, Node* oldNode)
+    ReplaceChildNodeAction(Node* parentNode, RefPtr<Node>&& newNode, Node* oldNode)
         : InspectorHistory::Action("ReplaceChildNode")
         , m_parentNode(parentNode)
-        , m_newNode(newNode)
+        , m_newNode(WTF::move(newNode))
         , m_oldNode(oldNode)
     {
     }
@@ -348,9 +348,9 @@ DOMEditor::DOMEditor(InspectorHistory* history) : m_history(history) { }
 
 DOMEditor::~DOMEditor() { }
 
-bool DOMEditor::insertBefore(Node* parentNode, PassRefPtr<Node> node, Node* anchorNode, ExceptionCode& ec)
+bool DOMEditor::insertBefore(Node* parentNode, RefPtr<Node>&& node, Node* anchorNode, ExceptionCode& ec)
 {
-    return m_history->perform(std::make_unique<InsertBeforeAction>(parentNode, node, anchorNode), ec);
+    return m_history->perform(std::make_unique<InsertBeforeAction>(parentNode, WTF::move(node), anchorNode), ec);
 }
 
 bool DOMEditor::removeChild(Node* parentNode, Node* node, ExceptionCode& ec)
@@ -383,9 +383,9 @@ bool DOMEditor::replaceWholeText(Text* textNode, const String& text, ExceptionCo
     return m_history->perform(std::make_unique<ReplaceWholeTextAction>(textNode, text), ec);
 }
 
-bool DOMEditor::replaceChild(Node* parentNode, PassRefPtr<Node> newNode, Node* oldNode, ExceptionCode& ec)
+bool DOMEditor::replaceChild(Node* parentNode, RefPtr<Node>&& newNode, Node* oldNode, ExceptionCode& ec)
 {
-    return m_history->perform(std::make_unique<ReplaceChildNodeAction>(parentNode, newNode, oldNode), ec);
+    return m_history->perform(std::make_unique<ReplaceChildNodeAction>(parentNode, WTF::move(newNode), oldNode), ec);
 }
 
 bool DOMEditor::setNodeValue(Node* node, const String& value, ExceptionCode& ec)
@@ -401,10 +401,10 @@ static void populateErrorString(const ExceptionCode& ec, ErrorString& errorStrin
     }
 }
 
-bool DOMEditor::insertBefore(Node* parentNode, PassRefPtr<Node> node, Node* anchorNode, ErrorString& errorString)
+bool DOMEditor::insertBefore(Node* parentNode, RefPtr<Node>&& node, Node* anchorNode, ErrorString& errorString)
 {
     ExceptionCode ec = 0;
-    bool result = insertBefore(parentNode, node, anchorNode, ec);
+    bool result = insertBefore(parentNode, WTF::move(node), anchorNode, ec);
     populateErrorString(ec, errorString);
     return result;
 }
index 56e114b..41badf0 100644 (file)
@@ -50,16 +50,16 @@ public:
     explicit DOMEditor(InspectorHistory*);
     ~DOMEditor();
 
-    bool insertBefore(Node* parentNode, PassRefPtr<Node>, Node* anchorNode, ExceptionCode&);
+    bool insertBefore(Node* parentNode, RefPtr<Node>&&, Node* anchorNode, ExceptionCode&);
     bool removeChild(Node* parentNode, Node*, ExceptionCode&);
     bool setAttribute(Element*, const String& name, const String& value, ExceptionCode&);
     bool removeAttribute(Element*, const String& name, ExceptionCode&);
     bool setOuterHTML(Node&, const String& html, Node** newNode, ExceptionCode&);
     bool replaceWholeText(Text*, const String& text, ExceptionCode&);
-    bool replaceChild(Node* parentNode, PassRefPtr<Node> newNode, Node* oldNode, ExceptionCode&);
+    bool replaceChild(Node* parentNode, RefPtr<Node>&& newNode, Node* oldNode, ExceptionCode&);
     bool setNodeValue(Node* parentNode, const String& value, ExceptionCode&);
 
-    bool insertBefore(Node* parentNode, PassRefPtr<Node>, Node* anchorNode, ErrorString&);
+    bool insertBefore(Node* parentNode, RefPtr<Node>&&, Node* anchorNode, ErrorString&);
     bool removeChild(Node* parentNode, Node*, ErrorString&);
     bool setAttribute(Element*, const String& name, const String& value, ErrorString&);
     bool removeAttribute(Element*, const String& name, ErrorString&);
index c782b7b..945e365 100644 (file)
@@ -468,7 +468,7 @@ bool DOMPatchSupport::removeChildAndMoveToNew(Digest* oldDigest, ExceptionCode&
     if (it != m_unusedNodesMap.end()) {
         Digest* newDigest = it->value;
         Node* newNode = newDigest->m_node;
-        if (!m_domEditor->replaceChild(newNode->parentNode(), oldNode, newNode, ec))
+        if (!m_domEditor->replaceChild(newNode->parentNode(), WTF::move(oldNode), newNode, ec))
             return false;
         newDigest->m_node = oldNode.get();
         markNodeAsUsed(newDigest);
index 673244c..ebfe32c 100644 (file)
@@ -1112,7 +1112,7 @@ void InspectorDOMAgent::highlightSelector(ErrorString& errorString, const Inspec
     if (!highlightConfig)
         return;
 
-    m_overlay->highlightNodeList(nodes, *highlightConfig);
+    m_overlay->highlightNodeList(WTF::move(nodes), *highlightConfig);
 }
 
 void InspectorDOMAgent::highlightNode(ErrorString& errorString, const InspectorObject& highlightInspectorObject, const int* nodeId, const String* objectId)
index e0d8d0b..241445a 100644 (file)
@@ -193,14 +193,14 @@ private:
 
 } // namespace
 
-void InspectorDatabaseAgent::didOpenDatabase(PassRefPtr<Database> database, const String& domain, const String& name, const String& version)
+void InspectorDatabaseAgent::didOpenDatabase(RefPtr<Database>&& database, const String& domain, const String& name, const String& version)
 {
     if (InspectorDatabaseResource* resource = findByFileName(database->fileName())) {
-        resource->setDatabase(database);
+        resource->setDatabase(WTF::move(database));
         return;
     }
 
-    RefPtr<InspectorDatabaseResource> resource = InspectorDatabaseResource::create(database, domain, name, version);
+    RefPtr<InspectorDatabaseResource> resource = InspectorDatabaseResource::create(WTF::move(database), domain, name, version);
     m_resources.set(resource->id(), resource);
     // Resources are only bound while visible.
     if (m_enabled)
index 6c9d227..a860f19 100644 (file)
@@ -67,7 +67,7 @@ public:
     // Called from the injected script.
     String databaseId(Database*);
 
-    void didOpenDatabase(PassRefPtr<Database>, const String& domain, const String& name, const String& version);
+    void didOpenDatabase(RefPtr<Database>&&, const String& domain, const String& name, const String& version);
 private:
     Database* databaseForId(const String& databaseId);
     InspectorDatabaseResource* findByFileName(const String& fileName);
index 1f10052..081b2c7 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "Database.h"
 #include "InspectorInstrumentation.h"
-#include <wtf/PassRefPtr.h>
 
 namespace WebCore {
 
index 6db85c9..6ac91c3 100644 (file)
@@ -46,7 +46,7 @@ public:
 
     void bind(Inspector::DatabaseFrontendDispatcher*);
     Database* database() { return m_database.get(); }
-    void setDatabase(RefPtr<Database>&& database) { m_database = database; }
+    void setDatabase(RefPtr<Database>&& database) { m_database = WTF::move(database); }
     String id() const { return m_id; }
 
 private:
index 8885e1c..7afd2a3 100644 (file)
@@ -59,9 +59,9 @@ namespace WebCore {
 #if ENABLE(CONTEXT_MENUS)
 class FrontendMenuProvider : public ContextMenuProvider {
 public:
-    static PassRefPtr<FrontendMenuProvider> create(InspectorFrontendHost* frontendHost, Deprecated::ScriptObject frontendApiObject, const Vector<ContextMenuItem>& items)
+    static Ref<FrontendMenuProvider> create(InspectorFrontendHost* frontendHost, Deprecated::ScriptObject frontendApiObject, const Vector<ContextMenuItem>& items)
     {
-        return adoptRef(new FrontendMenuProvider(frontendHost, frontendApiObject, items));
+        return adoptRef(*new FrontendMenuProvider(frontendHost, frontendApiObject, items));
     }
     
     void disconnect()
index 68ff17d..f5b17c8 100644 (file)
@@ -973,7 +973,7 @@ void InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents& instrume
     if (!instrumentingAgents.inspectorEnvironment().developerExtrasEnabled())
         return;
     if (InspectorDatabaseAgent* dbAgent = instrumentingAgents.inspectorDatabaseAgent())
-        dbAgent->didOpenDatabase(database, domain, name, version);
+        dbAgent->didOpenDatabase(WTF::move(database), domain, name, version);
 }
 
 void InspectorInstrumentation::didDispatchDOMStorageEventImpl(InstrumentingAgents& instrumentingAgents, const String& key, const String& oldValue, const String& newValue, StorageType storageType, SecurityOrigin* securityOrigin, Page* page)
index 10dedf2..6e95c87 100644 (file)
@@ -34,7 +34,6 @@
 #include <inspector/InspectorFrontendDispatchers.h>
 #include <inspector/InspectorProtocolObjects.h>
 #include "RenderLayer.h"
-#include <wtf/PassRefPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
index a31da79..ebc6219 100644 (file)
@@ -259,10 +259,10 @@ void InspectorOverlay::hideHighlight()
     update();
 }
 
-void InspectorOverlay::highlightNodeList(PassRefPtr<NodeList> nodes, const HighlightConfig& highlightConfig)
+void InspectorOverlay::highlightNodeList(RefPtr<NodeList>&& nodes, const HighlightConfig& highlightConfig)
 {
     m_nodeHighlightConfig = highlightConfig;
-    m_highlightNodeList = nodes;
+    m_highlightNodeList = WTF::move(nodes);
     m_highlightNode = nullptr;
     update();
 }
index 011464e..b5c4432 100644 (file)
@@ -120,7 +120,7 @@ public:
     void setPausedInDebuggerMessage(const String*);
 
     void hideHighlight();
-    void highlightNodeList(PassRefPtr<NodeList>, const HighlightConfig&);
+    void highlightNodeList(RefPtr<NodeList>&&, const HighlightConfig&);
     void highlightNode(Node*, const HighlightConfig&);
     void highlightQuad(std::unique_ptr<FloatQuad>, const HighlightConfig&);
     
index 116d607..899d585 100644 (file)
@@ -191,7 +191,7 @@ bool InspectorPageAgent::mainResourceContent(Frame* frame, bool withBase64Encode
 }
 
 // static
-bool InspectorPageAgent::sharedBufferContent(PassRefPtr<SharedBuffer> buffer, const String& textEncodingName, bool withBase64Encode, String* result)
+bool InspectorPageAgent::sharedBufferContent(RefPtr<SharedBuffer>&& buffer, const String& textEncodingName, bool withBase64Encode, String* result)
 {
     return dataContent(buffer ? buffer->data() : nullptr, buffer ? buffer->size() : 0, textEncodingName, withBase64Encode, result);
 }
index 05eefaf..28382b0 100644 (file)
@@ -83,7 +83,7 @@ public:
     };
 
     static bool cachedResourceContent(CachedResource*, String* result, bool* base64Encoded);
-    static bool sharedBufferContent(PassRefPtr<SharedBuffer>, const String& textEncodingName, bool withBase64Encode, String* result);
+    static bool sharedBufferContent(RefPtr<SharedBuffer>&&, const String& textEncodingName, bool withBase64Encode, String* result);
     static void resourceContent(ErrorString&, Frame*, const URL&, String* result, bool* base64Encoded);
     static String sourceMapURLForResource(CachedResource*);
 
index f94ec79..295393a 100644 (file)
@@ -81,8 +81,8 @@ namespace {
 class InspectorThreadableLoaderClient final : public ThreadableLoaderClient {
     WTF_MAKE_NONCOPYABLE(InspectorThreadableLoaderClient);
 public:
-    InspectorThreadableLoaderClient(PassRefPtr<LoadResourceCallback> callback)
-        : m_callback(callback) { }
+    InspectorThreadableLoaderClient(RefPtr<LoadResourceCallback>&& callback)
+        : m_callback(WTF::move(callback)) { }
 
     virtual ~InspectorThreadableLoaderClient() { }
 
@@ -140,9 +140,9 @@ public:
         dispose();
     }
 
-    void setLoader(PassRefPtr<ThreadableLoader> loader)
+    void setLoader(RefPtr<ThreadableLoader>&& loader)
     {
-        m_loader = loader;
+        m_loader = WTF::move(loader);
     }
 
 private:
index a9e198b..5fb3701 100644 (file)
@@ -223,19 +223,19 @@ void InspectorTimelineAgent::setPageScriptDebugServer(PageScriptDebugServer* scr
     m_scriptDebugServer = scriptDebugServer;
 }
 
-static inline void startProfiling(JSC::ExecState* exec, const String& title, PassRefPtr<Stopwatch> stopwatch)
+static inline void startProfiling(JSC::ExecState* exec, const String& title, RefPtr<Stopwatch>&& stopwatch)
 {
-    JSC::LegacyProfiler::profiler()->startProfiling(exec, title, stopwatch);
+    JSC::LegacyProfiler::profiler()->startProfiling(exec, title, WTF::move(stopwatch));
 }
 
-static inline PassRefPtr<JSC::Profile> stopProfiling(JSC::ExecState* exec, const String& title)
+static inline RefPtr<JSC::Profile> stopProfiling(JSC::ExecState* exec, const String& title)
 {
     return JSC::LegacyProfiler::profiler()->stopProfiling(exec, title);
 }
 
-static inline void startProfiling(Frame* frame, const String& title, PassRefPtr<Stopwatch> stopwatch)
+static inline void startProfiling(Frame* frame, const String& title, RefPtr<Stopwatch>&& stopwatch)
 {
-    startProfiling(toJSDOMWindow(frame, debuggerWorld())->globalExec(), title, stopwatch);
+    startProfiling(toJSDOMWindow(frame, debuggerWorld())->globalExec(), title, WTF::move(stopwatch));
 }
 
 static inline PassRefPtr<JSC::Profile> stopProfiling(Frame* frame, const String& title)
@@ -264,7 +264,7 @@ void InspectorTimelineAgent::startFromConsole(JSC::ExecState* exec, const String
     m_pendingConsoleProfileRecords.append(createRecordEntry(TimelineRecordFactory::createConsoleProfileData(title), TimelineRecordType::ConsoleProfile, true, frameFromExecState(exec)));
 }
 
-PassRefPtr<JSC::Profile> InspectorTimelineAgent::stopFromConsole(JSC::ExecState* exec, const String& title)
+RefPtr<JSC::Profile> InspectorTimelineAgent::stopFromConsole(JSC::ExecState* exec, const String& title)
 {
     // Stop profiles in reverse order. If the title is empty, then stop the last profile.
     // Otherwise, match the title of the profile to stop.
index 1cbce55..8f953b1 100644 (file)
@@ -134,7 +134,7 @@ public:
 
     // Methods called from WebCore.
     void startFromConsole(JSC::ExecState*, const String &title);
-    PassRefPtr<JSC::Profile> stopFromConsole(JSC::ExecState*, const String& title);
+    RefPtr<JSC::Profile> stopFromConsole(JSC::ExecState*, const String& title);
 
     // InspectorInstrumentation callbacks.
     void didInstallTimer(int timerId, int timeout, bool singleShot, Frame*);
@@ -198,8 +198,11 @@ private:
     struct TimelineRecordEntry {
         TimelineRecordEntry()
             : type(TimelineRecordType::EventDispatch) { }
-        TimelineRecordEntry(PassRefPtr<Inspector::InspectorObject> record, PassRefPtr<Inspector::InspectorObject> data, PassRefPtr<Inspector::InspectorArray> children, TimelineRecordType type)
-            : record(record), data(data), children(children), type(type)
+        TimelineRecordEntry(RefPtr<Inspector::InspectorObject>&& record, RefPtr<Inspector::InspectorObject>&& data, RefPtr<Inspector::InspectorArray>&& children, TimelineRecordType type)
+            : record(WTF::move(record))
+            , data(WTF::move(data))
+            , children(WTF::move(children))
+            , type(type)
         {
         }
 
index f8bed52..aeaa0d0 100644 (file)
@@ -31,7 +31,6 @@
 #ifndef InspectorWorkerResource_h
 #define InspectorWorkerResource_h
 
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 #include <wtf/text/WTFString.h>
@@ -40,9 +39,9 @@ namespace WebCore {
 
 class InspectorWorkerResource : public RefCounted<InspectorWorkerResource> {
 public:
-    static PassRefPtr<InspectorWorkerResource> create(intptr_t id, const String& url, bool isSharedWorker)
+    static Ref<InspectorWorkerResource> create(intptr_t id, const String& url, bool isSharedWorker)
     {
-        return adoptRef(new InspectorWorkerResource(id, url, isSharedWorker));
+        return adoptRef(*new InspectorWorkerResource(id, url, isSharedWorker));
     }
 
     intptr_t id() const { return m_id; }
index 99ffd92..25b5dce 100644 (file)
@@ -35,7 +35,6 @@
 #include <inspector/InspectorEnvironment.h>
 #include <wtf/FastMalloc.h>
 #include <wtf/Noncopyable.h>
-#include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace Inspector {
index a7f322f..de1ef9c 100644 (file)
@@ -136,7 +136,7 @@ void NetworkResourcesData::resourceCreated(const String& requestId, const String
     m_requestIdToResourceDataMap.set(requestId, new ResourceData(requestId, loaderId));
 }
 
-static PassRefPtr<TextResourceDecoder> createOtherResourceTextDecoder(const String& mimeType, const String& textEncodingName)
+static RefPtr<TextResourceDecoder> createOtherResourceTextDecoder(const String& mimeType, const String& textEncodingName)
 {
     RefPtr<TextResourceDecoder> decoder;
     if (!textEncodingName.isEmpty())
@@ -237,12 +237,12 @@ void NetworkResourcesData::addCachedResource(const String& requestId, CachedReso
     resourceData->setCachedResource(cachedResource);
 }
 
-void NetworkResourcesData::addResourceSharedBuffer(const String& requestId, PassRefPtr<SharedBuffer> buffer, const String& textEncodingName)
+void NetworkResourcesData::addResourceSharedBuffer(const String& requestId, RefPtr<SharedBuffer>&& buffer, const String& textEncodingName)
 {
     ResourceData* resourceData = resourceDataForRequestId(requestId);
     if (!resourceData)
         return;
-    resourceData->setBuffer(buffer);
+    resourceData->setBuffer(WTF::move(buffer));
     resourceData->setTextEncodingName(textEncodingName);
 }
 
index edd7579..7f85dd0 100644 (file)
@@ -129,7 +129,7 @@ public:
     void maybeAddResourceData(const String& requestId, const char* data, size_t dataLength);
     void maybeDecodeDataToContent(const String& requestId);
     void addCachedResource(const String& requestId, CachedResource*);
-    void addResourceSharedBuffer(const String& requestId, PassRefPtr<SharedBuffer>, const String& textEncodingName);
+    void addResourceSharedBuffer(const String& requestId, RefPtr<SharedBuffer>&&, const String& textEncodingName);
     ResourceData const* data(const String& requestId);
     Vector<String> removeCachedResource(CachedResource*);
     void clear(const String& preservedLoaderId = String());
index f859ddc..ebc7d7f 100644 (file)
@@ -183,9 +183,9 @@ Ref<InspectorObject> TimelineRecordFactory::createAnimationFrameData(int callbac
     return WTF::move(data);
 }
 
-static PassRefPtr<InspectorArray> createQuad(const FloatQuad& quad)
+static Ref<InspectorArray> createQuad(const FloatQuad& quad)
 {
-    RefPtr<InspectorArray> array = InspectorArray::create();
+    Ref<InspectorArray> array = InspectorArray::create();
     array->pushDouble(quad.p1().x());
     array->pushDouble(quad.p1().y());
     array->pushDouble(quad.p2().x());
index 6e7f986..84a4435 100644 (file)
@@ -32,7 +32,7 @@ namespace WebCore {
 
 class WebInjectedScriptHost final : public Inspector::InjectedScriptHost {
 public:
-    static PassRefPtr<WebInjectedScriptHost> create() { return adoptRef(new WebInjectedScriptHost); }
+    static Ref<WebInjectedScriptHost> create() { return adoptRef(*new WebInjectedScriptHost); }
 
     virtual JSC::JSValue subtype(JSC::ExecState*, JSC::JSValue) override;
     virtual bool isHTMLAllCollection(JSC::JSValue) override;
index 56196f0..c4be601 100644 (file)
@@ -33,8 +33,8 @@ using namespace Inspector;
 
 namespace WebCore {
 
-WebInjectedScriptManager::WebInjectedScriptManager(InspectorEnvironment& environment, PassRefPtr<InjectedScriptHost> host)
-    : InjectedScriptManager(environment, host)
+WebInjectedScriptManager::WebInjectedScriptManager(InspectorEnvironment& environment, RefPtr<InjectedScriptHost>&& host)
+    : InjectedScriptManager(environment, WTF::move(host))
     , m_commandLineAPIHost(CommandLineAPIHost::create())
 {
 }
index e8fc452..fcd45d7 100644 (file)
@@ -36,7 +36,7 @@ class DOMWindow;
 
 class WebInjectedScriptManager final : public Inspector::InjectedScriptManager {
 public:
-    WebInjectedScriptManager(Inspector::InspectorEnvironment&, PassRefPtr<Inspector::InjectedScriptHost>);
+    WebInjectedScriptManager(Inspector::InspectorEnvironment&, RefPtr<Inspector::InjectedScriptHost>&&);
     virtual ~WebInjectedScriptManager() { }
 
     CommandLineAPIHost* commandLineAPIHost() const { return m_commandLineAPIHost.get(); }