Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp

Issue 1917193006: WTF: Make PassOwnPtr<T> move-only. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/v8_inspector/V8InspectorSessionImpl.h" 5 #include "platform/v8_inspector/V8InspectorSessionImpl.h"
6 6
7 #include "platform/v8_inspector/InjectedScript.h" 7 #include "platform/v8_inspector/InjectedScript.h"
8 #include "platform/v8_inspector/InjectedScriptHost.h" 8 #include "platform/v8_inspector/InjectedScriptHost.h"
9 #include "platform/v8_inspector/InspectedContext.h" 9 #include "platform/v8_inspector/InspectedContext.h"
10 #include "platform/v8_inspector/RemoteObjectId.h" 10 #include "platform/v8_inspector/RemoteObjectId.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 ASSERT(m_instrumentationCounter + delta >= 0); 169 ASSERT(m_instrumentationCounter + delta >= 0);
170 if (!m_instrumentationCounter && m_client) 170 if (!m_instrumentationCounter && m_client)
171 m_client->startInstrumenting(); 171 m_client->startInstrumenting();
172 m_instrumentationCounter += delta; 172 m_instrumentationCounter += delta;
173 if (!m_instrumentationCounter && m_client) 173 if (!m_instrumentationCounter && m_client)
174 m_client->stopInstrumenting(); 174 m_client->stopInstrumenting();
175 } 175 }
176 176
177 void V8InspectorSessionImpl::addInspectedObject(PassOwnPtr<V8RuntimeAgent::Inspe ctable> inspectable) 177 void V8InspectorSessionImpl::addInspectedObject(PassOwnPtr<V8RuntimeAgent::Inspe ctable> inspectable)
178 { 178 {
179 m_inspectedObjects.prepend(inspectable); 179 m_inspectedObjects.prepend(std::move(inspectable));
180 while (m_inspectedObjects.size() > kInspectedObjectBufferSize) 180 while (m_inspectedObjects.size() > kInspectedObjectBufferSize)
181 m_inspectedObjects.removeLast(); 181 m_inspectedObjects.removeLast();
182 } 182 }
183 183
184 V8RuntimeAgent::Inspectable* V8InspectorSessionImpl::inspectedObject(unsigned nu m) 184 V8RuntimeAgent::Inspectable* V8InspectorSessionImpl::inspectedObject(unsigned nu m)
185 { 185 {
186 if (num >= m_inspectedObjects.size()) 186 if (num >= m_inspectedObjects.size())
187 return nullptr; 187 return nullptr;
188 return m_inspectedObjects[num].get(); 188 return m_inspectedObjects[num].get();
189 } 189 }
190 190
191 } // namespace blink 191 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698