summaryrefslogtreecommitdiffstats
path: root/chrome/common/json_value_serializer_perftest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/json_value_serializer_perftest.cc')
-rw-r--r--chrome/common/json_value_serializer_perftest.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/common/json_value_serializer_perftest.cc b/chrome/common/json_value_serializer_perftest.cc
index 6570d34..bef8fbe 100644
--- a/chrome/common/json_value_serializer_perftest.cc
+++ b/chrome/common/json_value_serializer_perftest.cc
@@ -52,10 +52,9 @@ TEST_F(JSONValueSerializerTests, Reading) {
PerfTimeLogger chrome_timer("chrome");
for (int i = 0; i < kIterations; ++i) {
for (size_t j = 0; j < test_cases_.size(); ++j) {
- Value* root = NULL;
JSONStringValueSerializer reader(test_cases_[j]);
- ASSERT_TRUE(reader.Deserialize(&root, NULL));
- delete root;
+ scoped_ptr<Value> root(reader.Deserialize(NULL));
+ ASSERT_TRUE(root.get());
}
}
chrome_timer.Done();
@@ -67,9 +66,9 @@ TEST_F(JSONValueSerializerTests, CompactWriting) {
// Convert test cases to Value objects.
std::vector<Value*> test_cases;
for (size_t i = 0; i < test_cases_.size(); ++i) {
- Value* root = NULL;
JSONStringValueSerializer reader(test_cases_[i]);
- ASSERT_TRUE(reader.Deserialize(&root, NULL));
+ Value* root = reader.Deserialize(NULL);
+ ASSERT_TRUE(root);
test_cases.push_back(root);
}