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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/Parser.cpp

Issue 1979963002: Remove OwnPtr::release() calls in platform/ (part inspector). (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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/inspector_protocol/Parser.cpp
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Parser.cpp b/third_party/WebKit/Source/platform/inspector_protocol/Parser.cpp
index 6e79ed2b4136634ca7f6ce25972b707b93541b85..c39dd1dbc9dd03e50e8f0852fcf4a275ba2cfb2c 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Parser.cpp
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Parser.cpp
@@ -401,7 +401,7 @@ PassOwnPtr<Value> buildValue(const UChar* start, const UChar* end, const UChar**
OwnPtr<Value> arrayNode = buildValue(start, end, &tokenEnd, depth + 1);
if (!arrayNode)
return nullptr;
- array->pushValue(arrayNode.release());
+ array->pushValue(std::move(arrayNode));
// After a list value, we expect a comma or the end of the list.
start = tokenEnd;
@@ -418,7 +418,7 @@ PassOwnPtr<Value> buildValue(const UChar* start, const UChar* end, const UChar**
}
if (token != ArrayEnd)
return nullptr;
- result = array.release();
+ result = std::move(array);
break;
}
case ObjectBegin: {
@@ -441,7 +441,7 @@ PassOwnPtr<Value> buildValue(const UChar* start, const UChar* end, const UChar**
OwnPtr<Value> value = buildValue(start, end, &tokenEnd, depth + 1);
if (!value)
return nullptr;
- object->setValue(key, value.release());
+ object->setValue(key, std::move(value));
start = tokenEnd;
// After a key/value pair, we expect a comma or the end of the
@@ -459,7 +459,7 @@ PassOwnPtr<Value> buildValue(const UChar* start, const UChar* end, const UChar**
}
if (token != ObjectEnd)
return nullptr;
- result = object.release();
+ result = std::move(object);
break;
}
@@ -469,7 +469,7 @@ PassOwnPtr<Value> buildValue(const UChar* start, const UChar* end, const UChar**
}
skipWhitespaceAndComments(tokenEnd, end, valueTokenEnd);
- return result.release();
+ return result;
}
PassOwnPtr<Value> parseJSONInternal(const UChar* start, unsigned length)
@@ -479,7 +479,7 @@ PassOwnPtr<Value> parseJSONInternal(const UChar* start, unsigned length)
OwnPtr<Value> value = buildValue(start, end, &tokenEnd, 0);
if (!value || tokenEnd != end)
return nullptr;
- return value.release();
+ return value;
}
} // anonymous namespace

Powered by Google App Engine
This is Rietveld 408576698