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

Unified Diff: base/json/json_writer.cc

Issue 2750533003: Temporarily CHECK use after free in Value (Closed)
Patch Set: Fix more Created 3 years, 9 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
« no previous file with comments | « no previous file | base/trace_event/trace_event_argument.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_writer.cc
diff --git a/base/json/json_writer.cc b/base/json/json_writer.cc
index 07b9d5091c80f6ba3292bbfa711429c9ec44dc23..301b19174dcf020f0f779fa1c09b3ce3b2ea32dd 100644
--- a/base/json/json_writer.cc
+++ b/base/json/json_writer.cc
@@ -198,6 +198,11 @@ bool JSONWriter::BuildJSONString(const Value& node, size_t depth) {
// Successful only if we're allowed to omit it.
DLOG_IF(ERROR, !omit_binary_values_) << "Cannot serialize binary value.";
return omit_binary_values_;
+
+ case Value::Type::DELETED:
+ // TODO(crbug.com/697817): This means |node| is used after free.
+ CHECK(false);
+ return false;
}
NOTREACHED();
return false;
« no previous file with comments | « no previous file | base/trace_event/trace_event_argument.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698