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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp

Issue 2004313003: DevTools: migrate from OwnPtr to std::unique_ptr for inspector protocol classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp
index fbc54a40e99a6fc7707717c28af391b90f18e664..fa9aef0a74459db1d21276308e89c0d6f83a7d64 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorConsoleAgent.cpp
@@ -156,7 +156,7 @@ static String messageLevelValue(MessageLevel level)
void InspectorConsoleAgent::sendConsoleMessageToFrontend(ConsoleMessage* consoleMessage, bool generatePreview, double* timestamp)
{
- OwnPtr<protocol::Console::ConsoleMessage> jsonObj = protocol::Console::ConsoleMessage::create()
+ std::unique_ptr<protocol::Console::ConsoleMessage> jsonObj = protocol::Console::ConsoleMessage::create()
.setSource(messageSourceValue(consoleMessage->source()))
.setLevel(messageLevelValue(consoleMessage->level()))
.setText(consoleMessage->message())
@@ -176,18 +176,18 @@ void InspectorConsoleAgent::sendConsoleMessageToFrontend(ConsoleMessage* console
if (arguments && arguments->argumentCount()) {
ScriptState::Scope scope(arguments->getScriptState());
v8::Local<v8::Context> context = arguments->getScriptState()->context();
- OwnPtr<protocol::Array<protocol::Runtime::RemoteObject>> jsonArgs = protocol::Array<protocol::Runtime::RemoteObject>::create();
+ std::unique_ptr<protocol::Array<protocol::Runtime::RemoteObject>> jsonArgs = protocol::Array<protocol::Runtime::RemoteObject>::create();
if (consoleMessage->type() == TableMessageType && generatePreview) {
v8::Local<v8::Value> table = arguments->argumentAt(0).v8Value();
v8::Local<v8::Value> columns = arguments->argumentCount() > 1 ? arguments->argumentAt(1).v8Value() : v8::Local<v8::Value>();
- OwnPtr<protocol::Runtime::RemoteObject> inspectorValue = m_v8Session->wrapTable(context, table, columns);
+ std::unique_ptr<protocol::Runtime::RemoteObject> inspectorValue = m_v8Session->wrapTable(context, table, columns);
if (inspectorValue)
jsonArgs->addItem(std::move(inspectorValue));
else
jsonArgs = nullptr;
} else {
for (unsigned i = 0; i < arguments->argumentCount(); ++i) {
- OwnPtr<protocol::Runtime::RemoteObject> inspectorValue = m_v8Session->wrapObject(context, arguments->argumentAt(i).v8Value(), "console", generatePreview);
+ std::unique_ptr<protocol::Runtime::RemoteObject> inspectorValue = m_v8Session->wrapObject(context, arguments->argumentAt(i).v8Value(), "console", generatePreview);
if (!inspectorValue) {
jsonArgs = nullptr;
break;

Powered by Google App Engine
This is Rietveld 408576698