hterm: invalid character-map-overrides settings are not rejected |
|
Issue description
if you enter a value like {"":""} into character-map-overrides, then hterm fails to load properly, and the JS console has errors like:
Error in event handler for storage.onChanged: TypeError: Cannot read property 'glmap' of undefined
we should validate this more before accepting it.
,
Jun 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/apps/libapps/+/095d406b72154ef69acb229bb347b6cdfd91c9e3 commit 095d406b72154ef69acb229bb347b6cdfd91c9e3 Author: Mike Frysinger <vapier@chromium.org> Date: Wed Jun 28 00:04:27 2017 hterm: character maps: add a container for sets of maps The current mapping logic is a global variable, so whenever a single terminal instance modifies its own set of maps, it ends up changing the mappings for all terminal instances. Lets create a new structure instead to handle these mappings so each terminal can modify things w/out interfering with other ones. This also allows us to push down the map overriding from the terminal to the character maps. BUG=chromium:718670 Change-Id: Id55f477e3216d45809eff250f8c64339cfab2bf2 Reviewed-on: https://chromium-review.googlesource.com/539177 Reviewed-by: Brandon Gilmore <varz@google.com> Tested-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/095d406b72154ef69acb229bb347b6cdfd91c9e3/hterm/js/hterm_vt_character_map_tests.js [modify] https://crrev.com/095d406b72154ef69acb229bb347b6cdfd91c9e3/hterm/js/hterm_terminal.js [modify] https://crrev.com/095d406b72154ef69acb229bb347b6cdfd91c9e3/hterm/js/hterm_vt_character_map.js [modify] https://crrev.com/095d406b72154ef69acb229bb347b6cdfd91c9e3/hterm/js/hterm_vt.js |
|
►
Sign in to add a comment |
|
Comment 1 by bugdroid1@chromium.org
, Jun 28 2017