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

Issue 289343005: Do not CHECK on the result of Sql::Statement::Run. (Closed)

Created:
6 years, 7 months ago by jiayl
Modified:
6 years, 7 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, jam, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Do not CHECK on the result of Sql::Statement::Run. It may fail on database errors. We should not crash Chrome for such errors. The CHECK is replaced by a log message. We already handles database error in general in OnDatabaseError, so no additional error handling is needed. BUG=376884 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273135

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Total comments: 8

Patch Set 3 : raze on all errors #

Total comments: 2

Patch Set 4 : #

Total comments: 2

Patch Set 5 : use ScopedVector #

Total comments: 1

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -27 lines) Patch
M content/browser/media/webrtc_identity_store_backend.cc View 1 2 3 4 5 9 chunks +47 lines, -27 lines 0 comments Download
M content/browser/media/webrtc_identity_store_unittest.cc View 1 2 2 chunks +33 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
jiayl
PTAL
6 years, 7 months ago (2014-05-23 22:52:53 UTC) #1
Ami GONE FROM CHROMIUM
https://codereview.chromium.org/289343005/diff/1/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/1/content/browser/media/webrtc_identity_store_backend.cc#newcode490 content/browser/media/webrtc_identity_store_backend.cc:490: if (!sql::IsErrorCatastrophic(error)) CL description implies that all the things ...
6 years, 7 months ago (2014-05-23 23:05:36 UTC) #2
jiayl
Thanks! https://codereview.chromium.org/289343005/diff/1/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/1/content/browser/media/webrtc_identity_store_backend.cc#newcode490 content/browser/media/webrtc_identity_store_backend.cc:490: if (!sql::IsErrorCatastrophic(error)) On 2014/05/23 23:05:37, Ami Fischman wrote: ...
6 years, 7 months ago (2014-05-23 23:25:39 UTC) #3
Ami GONE FROM CHROMIUM
I'd be more comfortable if you got a SQL/DB expert to review this instead of ...
6 years, 7 months ago (2014-05-23 23:30:30 UTC) #4
jiayl
https://codereview.chromium.org/289343005/diff/20001/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/20001/content/browser/media/webrtc_identity_store_backend.cc#newcode498 content/browser/media/webrtc_identity_store_backend.cc:498: !StartsWithASCII(statement, "DELETE", false)) { On 2014/05/23 23:30:30, Ami Fischman ...
6 years, 7 months ago (2014-05-23 23:34:54 UTC) #5
jiayl
Adding shess to review the DB operations, based on the revision log of statement.h.
6 years, 7 months ago (2014-05-23 23:37:06 UTC) #6
Ami GONE FROM CHROMIUM
https://codereview.chromium.org/289343005/diff/20001/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/20001/content/browser/media/webrtc_identity_store_backend.cc#newcode498 content/browser/media/webrtc_identity_store_backend.cc:498: !StartsWithASCII(statement, "DELETE", false)) { On 2014/05/23 23:34:54, jiayl wrote: ...
6 years, 7 months ago (2014-05-23 23:47:00 UTC) #7
jiayl
https://codereview.chromium.org/289343005/diff/20001/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/20001/content/browser/media/webrtc_identity_store_backend.cc#newcode498 content/browser/media/webrtc_identity_store_backend.cc:498: !StartsWithASCII(statement, "DELETE", false)) { On 2014/05/23 23:47:01, Ami Fischman ...
6 years, 7 months ago (2014-05-23 23:53:25 UTC) #8
Ami GONE FROM CHROMIUM
SG. Will defer to shess@ for review. On Fri, May 23, 2014 at 4:53 PM, ...
6 years, 7 months ago (2014-05-23 23:54:42 UTC) #9
Scott Hess - ex-Googler
Another option in the DELETE case might be to actually encode your sensitive deletes in ...
6 years, 7 months ago (2014-05-24 05:06:40 UTC) #10
Ami GONE FROM CHROMIUM
> > Long-term, you might want to tighten the screws past what the "is > ...
6 years, 7 months ago (2014-05-26 05:32:18 UTC) #11
jiayl
On 2014/05/26 05:32:18, Ami Fischman wrote: > > > > Long-term, you might want to ...
6 years, 7 months ago (2014-05-27 18:18:24 UTC) #12
jiayl
https://codereview.chromium.org/289343005/diff/20001/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/20001/content/browser/media/webrtc_identity_store_backend.cc#newcode383 content/browser/media/webrtc_identity_store_backend.cc:383: DVLOG(2) << "Unable to open DB."; On 2014/05/24 05:06:41, ...
6 years, 7 months ago (2014-05-27 18:18:30 UTC) #13
Ami GONE FROM CHROMIUM
@shess: is it guaranteed that a stmt.Run() returning false will result in an OnDatabaseError() callback? ...
6 years, 7 months ago (2014-05-27 19:25:05 UTC) #14
Scott Hess - ex-Googler
On 2014/05/27 19:25:05, Ami Fischman wrote: > @shess: is it guaranteed that a stmt.Run() returning ...
6 years, 7 months ago (2014-05-27 20:30:08 UTC) #15
Scott Hess - ex-Googler
On Tue, May 27, 2014 at 1:30 PM, <shess@chromium.org> wrote: > I don't see sql::Connection::set_histogram_tag() ...
6 years, 7 months ago (2014-05-27 20:31:17 UTC) #16
jiayl
https://codereview.chromium.org/289343005/diff/40001/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/40001/content/browser/media/webrtc_identity_store_backend.cc#newcode573 content/browser/media/webrtc_identity_store_backend.cc:573: return; On 2014/05/27 19:25:06, Ami Fischman wrote: > In ...
6 years, 7 months ago (2014-05-27 20:57:25 UTC) #17
Ami GONE FROM CHROMIUM
https://codereview.chromium.org/289343005/diff/50003/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/50003/content/browser/media/webrtc_identity_store_backend.cc#newcode557 content/browser/media/webrtc_identity_store_backend.cc:557: // |pending_operations_| is always cleared in case of DB ...
6 years, 7 months ago (2014-05-27 22:16:26 UTC) #18
jiayl
https://codereview.chromium.org/289343005/diff/50003/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/50003/content/browser/media/webrtc_identity_store_backend.cc#newcode557 content/browser/media/webrtc_identity_store_backend.cc:557: // |pending_operations_| is always cleared in case of DB ...
6 years, 7 months ago (2014-05-27 22:58:35 UTC) #19
Ami GONE FROM CHROMIUM
LGTM https://codereview.chromium.org/289343005/diff/70001/content/browser/media/webrtc_identity_store_backend.cc File content/browser/media/webrtc_identity_store_backend.cc (right): https://codereview.chromium.org/289343005/diff/70001/content/browser/media/webrtc_identity_store_backend.cc#newcode565 content/browser/media/webrtc_identity_store_backend.cc:565: PendingOperation* po = *it; FWIW could also const& ...
6 years, 7 months ago (2014-05-27 23:00:28 UTC) #20
jiayl
The CQ bit was checked by jiayl@chromium.org
6 years, 7 months ago (2014-05-27 23:12:03 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jiayl@chromium.org/289343005/90001
6 years, 7 months ago (2014-05-27 23:12:20 UTC) #22
commit-bot: I haz the power
6 years, 7 months ago (2014-05-28 03:09:24 UTC) #23
Message was sent while issue was closed.
Change committed as 273135

Powered by Google App Engine
This is Rietveld 408576698