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

Issue 117323008: Return error on JSON request failures (Closed)

Created:
6 years, 11 months ago by Xianzhu
Modified:
6 years, 11 months ago
Reviewers:
dsinclair, nduca
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, dsinclair+watch_chromium.org, jam
Visibility:
Public.

Description

Return error on JSON request failures Previously on a TracingController error, OnBeginRequest returns false, and then WebUIDataSource will return the default resource (tracing.html). This will cause a successful XHR request and a JSON parse failure in tracing frontend code. Return "##ERROR##" to express the error so that the frontend can handle the error. BUG=331286 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243162

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -7 lines) Patch
M content/browser/tracing/tracing_ui.cc View 2 chunks +17 lines, -7 lines 2 comments Download

Messages

Total messages: 6 (0 generated)
Xianzhu
6 years, 11 months ago (2014-01-03 23:09:47 UTC) #1
dsinclair
https://codereview.chromium.org/117323008/diff/1/content/browser/tracing/tracing_ui.cc File content/browser/tracing/tracing_ui.cc (right): https://codereview.chromium.org/117323008/diff/1/content/browser/tracing/tracing_ui.cc#newcode150 content/browser/tracing/tracing_ui.cc:150: std::string error("##ERROR##"); Why not make this valid json? {"error": ...
6 years, 11 months ago (2014-01-06 15:20:33 UTC) #2
Xianzhu
https://codereview.chromium.org/117323008/diff/1/content/browser/tracing/tracing_ui.cc File content/browser/tracing/tracing_ui.cc (right): https://codereview.chromium.org/117323008/diff/1/content/browser/tracing/tracing_ui.cc#newcode150 content/browser/tracing/tracing_ui.cc:150: std::string error("##ERROR##"); On 2014/01/06 15:20:33, dsinclair wrote: > Why ...
6 years, 11 months ago (2014-01-06 17:11:26 UTC) #3
dsinclair
lgtm
6 years, 11 months ago (2014-01-06 17:36:35 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/117323008/1
6 years, 11 months ago (2014-01-06 17:41:26 UTC) #5
commit-bot: I haz the power
6 years, 11 months ago (2014-01-06 20:55:08 UTC) #6
Message was sent while issue was closed.
Change committed as 243162

Powered by Google App Engine
This is Rietveld 408576698