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

Unified Diff: third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.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/html/parser/XSSAuditorDelegate.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
index 4b3b949fbb0a88f6e9253b5054b42b2980f3b38a..aaef92f50cae7aa8909febe935daf787dcc61ed4 100644
--- a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
+++ b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
@@ -90,12 +90,12 @@ PassRefPtr<EncodedFormData> XSSAuditorDelegate::generateViolationReport(const XS
httpBody = formData->flattenToString();
}
- RefPtr<JSONObject> reportDetails = JSONObject::create();
+ std::unique_ptr<JSONObject> reportDetails = JSONObject::create();
reportDetails->setString("request-url", xssInfo.m_originalURL);
reportDetails->setString("request-body", httpBody);
- RefPtr<JSONObject> reportObject = JSONObject::create();
- reportObject->setObject("xss-report", reportDetails.release());
+ std::unique_ptr<JSONObject> reportObject = JSONObject::create();
+ reportObject->setObject("xss-report", std::move(reportDetails));
return EncodedFormData::create(reportObject->toJSONString().utf8().data());
}

Powered by Google App Engine
This is Rietveld 408576698