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

Issue 10546129: Adding validity checks to sql statements in AutocompleteActionPredictorTable. (Closed)

Created:
8 years, 6 months ago by Shishir
Modified:
8 years, 6 months ago
CC:
chromium-reviews, Greg Billock
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Adding validity checks to sql statements in AutocompleteActionPredictorTable. BUG=131697 TEST=None. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141753

Patch Set 1 #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -6 lines) Patch
M chrome/browser/predictors/autocomplete_action_predictor_table.cc View 6 chunks +24 lines, -6 lines 12 comments Download

Messages

Total messages: 7 (0 generated)
Shishir
Please take a look.
8 years, 6 months ago (2012-06-12 18:52:35 UTC) #1
dominich
why? https://chromiumcodereview.appspot.com/10546129/diff/1/chrome/browser/predictors/autocomplete_action_predictor_table.cc File chrome/browser/predictors/autocomplete_action_predictor_table.cc (right): https://chromiumcodereview.appspot.com/10546129/diff/1/chrome/browser/predictors/autocomplete_action_predictor_table.cc#newcode103 chrome/browser/predictors/autocomplete_action_predictor_table.cc:103: if (!statement.is_valid()) have you seen this happen? https://chromiumcodereview.appspot.com/10546129/diff/1/chrome/browser/predictors/autocomplete_action_predictor_table.cc#newcode188 ...
8 years, 6 months ago (2012-06-12 19:11:06 UTC) #2
Shishir
Please see bug 131697. I am adding the checks to narrow the issue. https://chromiumcodereview.appspot.com/10546129/diff/1/chrome/browser/predictors/autocomplete_action_predictor_table.cc File ...
8 years, 6 months ago (2012-06-12 19:35:22 UTC) #3
dominich
LGTM I'm suspicious that there's an underlying issue with Profile destruction and sqlite transactions, but ...
8 years, 6 months ago (2012-06-12 19:44:43 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shishir@chromium.org/10546129/1
8 years, 6 months ago (2012-06-12 20:53:19 UTC) #5
commit-bot: I haz the power
Change committed as 141753
8 years, 6 months ago (2012-06-12 21:54:30 UTC) #6
Scott Hess - ex-Googler
8 years, 6 months ago (2012-06-12 22:30:14 UTC) #7
I think this CL is mis-understanding the API.  Looping in gbillock for more
extensive explanations if needed (I'm not supposed to be looking at this stuff
right now).

The gist of things is that an invalid statement should short-circuit everything,
so you should only need to check is_valid() if you're going to have side
effects.  You'll hit DCHECK in debug builds, because, broadly put, the only ways
statements are invalid is if the developer is doing things wrong, or if the
database is corrupt.  It is assumed that developers never have corrupt
databases.

Powered by Google App Engine
This is Rietveld 408576698