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

Issue 2649233002: Fix a space problem with the use of XkbKeyboardLayoutEngine::xkb_flag_map_ (Closed)

Created:
3 years, 11 months ago by tonikitoo
Modified:
3 years, 11 months ago
Reviewers:
spang
CC:
chromium-reviews, kalyank, ozone-reviews_chromium.org, tdresser+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a space problem with the use of XkbKeyboardLayoutEngine::xkb_flag_map_ In XkbKeyboardLayoutEngine::SetKeymap, xkb_flag_map_ is "cleared" and its resized to a known size 'n'. At this point, and all values are zero'ed out. Later on, std::vector<type>::push_back is used to populate the vector. Problem is that the new entries are inserted after the set of 'n' zero'ed out entries. CL fixes it by using std::vector<type::reserve instead. Review-Url: https://codereview.chromium.org/2649233002 Cr-Commit-Position: refs/heads/master@{#445801} Committed: https://chromium.googlesource.com/chromium/src/+/c6ddb615e307d10bff949570707cbaa964f5795d

Patch Set 1 #

Total comments: 1

Patch Set 2 : addressed spang's remark #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20 (13 generated)
tonikitoo
PTAL (quick driven by CL)
3 years, 11 months ago (2017-01-23 20:08:02 UTC) #4
spang
Good catch. You can fix it by changing resize() to reserve(). https://codereview.chromium.org/2649233002/diff/1/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc File ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc (right): ...
3 years, 11 months ago (2017-01-23 23:29:04 UTC) #7
tonikitoo
On 2017/01/23 23:29:04, spang wrote: > Good catch. You can fix it by changing resize() ...
3 years, 11 months ago (2017-01-24 03:00:00 UTC) #8
fwang
informal l g t m
3 years, 11 months ago (2017-01-24 11:12:51 UTC) #14
spang
lgtm
3 years, 11 months ago (2017-01-24 20:22:48 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2649233002/20001
3 years, 11 months ago (2017-01-24 20:23:30 UTC) #17
commit-bot: I haz the power
3 years, 11 months ago (2017-01-24 20:48:31 UTC) #20
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/c6ddb615e307d10bff949570707c...

Powered by Google App Engine
This is Rietveld 408576698