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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2218533002: Backporting JSONValues from protocol::Values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch back to partition allocator Created 4 years, 4 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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 15ae442e9a9fb3ac1d7ab4b34e0fade56b777386..8e1c56094984b3ed6e25d921ce18559e32be4fe8 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3045,21 +3045,21 @@ void FrameView::trackObjectPaintInvalidation(const DisplayItemClient& client, Pa
m_trackedObjectPaintInvalidations->append(invalidation);
}
-PassRefPtr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() const
+std::unique_ptr<JSONArray> FrameView::trackedObjectPaintInvalidationsAsJSON() const
{
if (!m_trackedObjectPaintInvalidations)
return nullptr;
- RefPtr<JSONArray> result = JSONArray::create();
+ std::unique_ptr<JSONArray> result = JSONArray::create();
for (Frame* frame = m_frame->tree().top(); frame; frame = frame->tree().traverseNext()) {
if (!frame->isLocalFrame())
continue;
if (LayoutViewItem layoutView = toLocalFrame(frame)->contentLayoutItem()) {
for (const auto& item : *layoutView.frameView()->m_trackedObjectPaintInvalidations) {
- RefPtr<JSONObject> itemJSON = JSONObject::create();
+ std::unique_ptr<JSONObject> itemJSON = JSONObject::create();
itemJSON->setString("object", item.name);
itemJSON->setString("reason", paintInvalidationReasonToString(item.reason));
- result->pushObject(itemJSON);
+ result->pushObject(std::move(itemJSON));
}
}
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698