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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 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
« no previous file with comments | « components/invalidation/p2p_invalidator.cc ('k') | components/omnibox/search_suggestion_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index 5ebc61f9080f00ec125b9a5d1a468421047f62dc..e77b977ff13bddc12dccdf9cf8c787440ef06980 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -1190,12 +1190,12 @@ PP_Bool GetPNaClResourceInfo(PP_Instance instance,
base::JSONReader json_reader;
int json_read_error_code;
std::string json_read_error_msg;
- base::Value* json_data = json_reader.ReadAndReturnError(
+ scoped_ptr<base::Value> json_data(json_reader.ReadAndReturnError(
buffer.get(),
base::JSON_PARSE_RFC,
&json_read_error_code,
- &json_read_error_msg);
- if (json_data == NULL) {
+ &json_read_error_msg));
+ if (!json_data) {
load_manager->ReportLoadError(
PP_NACL_ERROR_PNACL_RESOURCE_FETCH,
std::string("Parsing resource info failed: JSON parse error: ") +
« no previous file with comments | « components/invalidation/p2p_invalidator.cc ('k') | components/omnibox/search_suggestion_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698