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

Issue 1163963004: [Omnibox] Changing scheme from https:// to http:// results in DCHECK (Always). (Closed)

Created:
5 years, 6 months ago by Pritam Nikam
Modified:
5 years, 6 months ago
Reviewers:
Mark P, vivekg_samsung
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Omnibox] Changing protocol scheme from https:// to http:// results in DCHECK (Always). With present implementation, for giving scores to the history urls based on supplied term string, it calculates word start offsets for each term (word). However cases where term do not having word-part set to zero (as default). This leads to DCHECK(at_word_boundary) fail in later part execution inside ScoredHistoryMatch::GetTopicalityScore(). For instance, term string "http ://", both the terms {"http", "://"} are offsets to {0, 0}. This patch, sets the missing word-parts start offset to the size of the term (word), i.e. for terms {"http", "://"} sets start offsets to {0, 3}, avoiding this DCHECK failure. BUG=495571 R=mpearson@chromium.org TEST=InMemoryURLIndexTest.AddHistoryMatch Committed: https://crrev.com/9501f2bcce4f6537edf70bbeeef8ddeea927cd76 Cr-Commit-Position: refs/heads/master@{#334340}

Patch Set 1 #

Patch Set 2 : Added unit tests. #

Total comments: 20

Patch Set 3 : Addresses Mark's review comments. #

Patch Set 4 : Fixed breakages on mac trybot. #

Total comments: 2

Patch Set 5 : #

Total comments: 2

Patch Set 6 : Incorporates review. #

Total comments: 2

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -4 lines) Patch
M chrome/browser/autocomplete/in_memory_url_index_unittest.cc View 1 2 3 4 5 6 3 chunks +101 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/url_index_private_data.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/url_index_private_data.cc View 1 2 3 4 5 6 1 chunk +5 lines, -4 lines 0 comments Download

Messages

Total messages: 51 (18 generated)
Pritam Nikam
Hi Vivek, I've encountered this DCHECK failure in my local testing. Please glance through it. ...
5 years, 6 months ago (2015-06-04 10:44:46 UTC) #2
Peter Kasting
On 2015/06/04 10:44:46, Pritam Nikam wrote: > Hi Vivek, > > I've encountered this DCHECK ...
5 years, 6 months ago (2015-06-04 21:15:05 UTC) #4
Mark P
I'm not convinced the current code is wrong. Can you give an example of the ...
5 years, 6 months ago (2015-06-04 22:08:34 UTC) #5
Pritam Nikam
On 2015/06/04 22:08:34, Mark P wrote: > I'm not convinced the current code is wrong. ...
5 years, 6 months ago (2015-06-05 12:25:30 UTC) #6
Mark P
On 2015/06/05 12:25:30, Pritam Nikam wrote: > On 2015/06/04 22:08:34, Mark P wrote: > > ...
5 years, 6 months ago (2015-06-05 17:22:24 UTC) #7
Pritam Nikam
On 2015/06/05 17:22:24, Mark P wrote: > On 2015/06/05 12:25:30, Pritam Nikam wrote: > > ...
5 years, 6 months ago (2015-06-05 18:48:32 UTC) #8
Pritam Nikam
On 2015/06/05 18:48:32, Pritam Nikam wrote: > On 2015/06/05 17:22:24, Mark P wrote: > > ...
5 years, 6 months ago (2015-06-05 18:51:47 UTC) #9
Pritam Nikam
Hi Mark, I've added unit tests. Please have a look. Thanks!
5 years, 6 months ago (2015-06-08 15:25:48 UTC) #10
Mark P
Generally fine. Lots of minor comments, nothing major. --mark https://codereview.chromium.org/1163963004/diff/20001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc File chrome/browser/autocomplete/in_memory_url_index_unittest.cc (right): https://codereview.chromium.org/1163963004/diff/20001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc#newcode1197 chrome/browser/autocomplete/in_memory_url_index_unittest.cc:1197: ...
5 years, 6 months ago (2015-06-08 18:13:17 UTC) #11
Pritam Nikam
Thanks Mark for review inputs. I've addressed these along new patch set (#3), ptal. Thanks! ...
5 years, 6 months ago (2015-06-09 10:03:53 UTC) #12
Mark P
lgtm
5 years, 6 months ago (2015-06-09 17:19:09 UTC) #13
Pritam Nikam
On 2015/06/09 17:19:09, Mark P wrote: > lgtm Thanks Mark! I'll proceed with commit. Thanks!
5 years, 6 months ago (2015-06-10 05:30:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1163963004/40001
5 years, 6 months ago (2015-06-10 05:31:23 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/61929)
5 years, 6 months ago (2015-06-10 05:54:55 UTC) #18
Pritam Nikam
On 2015/06/10 05:54:55, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 6 months ago (2015-06-10 10:47:06 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1163963004/60001
5 years, 6 months ago (2015-06-10 15:12:21 UTC) #22
Pritam Nikam
Hi Mark, There seems a problem with mac trybot for C++11 (clang) error about initializing ...
5 years, 6 months ago (2015-06-10 15:44:34 UTC) #23
Mark P
https://codereview.chromium.org/1163963004/diff/60001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc File chrome/browser/autocomplete/in_memory_url_index_unittest.cc (right): https://codereview.chromium.org/1163963004/diff/60001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc#newcode1230 chrome/browser/autocomplete/in_memory_url_index_unittest.cc:1230: const SizeVector expected_word_starts_offsets; Instead of this approach, just use ...
5 years, 6 months ago (2015-06-10 16:53:01 UTC) #24
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-10 17:04:35 UTC) #26
Pritam Nikam
Hi Mark, PTAL. Thanks! https://codereview.chromium.org/1163963004/diff/60001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc File chrome/browser/autocomplete/in_memory_url_index_unittest.cc (right): https://codereview.chromium.org/1163963004/diff/60001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc#newcode1230 chrome/browser/autocomplete/in_memory_url_index_unittest.cc:1230: const SizeVector expected_word_starts_offsets; On 2015/06/10 ...
5 years, 6 months ago (2015-06-11 03:06:10 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1163963004/80001
5 years, 6 months ago (2015-06-11 03:07:01 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/66750)
5 years, 6 months ago (2015-06-11 04:36:07 UTC) #32
Mark P
https://codereview.chromium.org/1163963004/diff/80001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc File chrome/browser/autocomplete/in_memory_url_index_unittest.cc (right): https://codereview.chromium.org/1163963004/diff/80001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc#newcode1289 chrome/browser/autocomplete/in_memory_url_index_unittest.cc:1289: } You should either check that match.lower_terms_to_word_starts_offsets_.size() is the ...
5 years, 6 months ago (2015-06-11 18:37:06 UTC) #33
Pritam Nikam
Thanks Mark. I've incorporated review input in new patch set, please have a look. Thanks! ...
5 years, 6 months ago (2015-06-12 06:09:50 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1163963004/100001
5 years, 6 months ago (2015-06-12 06:10:40 UTC) #37
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-12 07:03:48 UTC) #39
Mark P
lgtm https://codereview.chromium.org/1163963004/diff/100001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc File chrome/browser/autocomplete/in_memory_url_index_unittest.cc (right): https://codereview.chromium.org/1163963004/diff/100001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc#newcode1223 chrome/browser/autocomplete/in_memory_url_index_unittest.cc:1223: const size_t expected_word_starts_offsets[4]; FYI: this can be [3] ...
5 years, 6 months ago (2015-06-12 20:02:26 UTC) #40
Pritam Nikam
Thanks Mark, I'll go ahead with CQ. Thanks! https://codereview.chromium.org/1163963004/diff/100001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc File chrome/browser/autocomplete/in_memory_url_index_unittest.cc (right): https://codereview.chromium.org/1163963004/diff/100001/chrome/browser/autocomplete/in_memory_url_index_unittest.cc#newcode1223 chrome/browser/autocomplete/in_memory_url_index_unittest.cc:1223: const ...
5 years, 6 months ago (2015-06-13 10:48:16 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1163963004/140001
5 years, 6 months ago (2015-06-13 10:50:54 UTC) #45
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/69501)
5 years, 6 months ago (2015-06-13 12:22:03 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1163963004/140001
5 years, 6 months ago (2015-06-13 12:29:15 UTC) #49
commit-bot: I haz the power
Committed patchset #7 (id:140001)
5 years, 6 months ago (2015-06-13 13:20:43 UTC) #50
commit-bot: I haz the power
5 years, 6 months ago (2015-06-13 13:21:32 UTC) #51
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/9501f2bcce4f6537edf70bbeeef8ddeea927cd76
Cr-Commit-Position: refs/heads/master@{#334340}

Powered by Google App Engine
This is Rietveld 408576698