summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAngela Czubak <acz@semihalf.com>2022-06-14 09:58:33 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-18 21:21:46 +0000
commitf41bc9f422276a5715da72fa72f77ac2e8bb3f7b (patch)
tree577264d946fcafae2bd299c0fdf6e4b01e2ec81c /tools
parent32ce058905b8bf8099b9d81fa81207d18e7ccaf6 (diff)
downloadlibchrome-gestures-f41bc9f422276a5715da72fa72f77ac2e8bb3f7b.tar.gz
Replace home-made map and set implementations in gestures library
We used X11 in ChromeOS in a way in which X called our code from within signal handlers. This meant that no mallocs could be used and, hence, we could not use map and set from standard library. Since X11 is no longer used in ChromeOS we should be safe to switch to map and set from standard library. Modify immediate interpreter unittest as std::vector::reserve() allocates only the space for the vector elements but it does not construct them. This in turn caused segmentation fault when using copy assignment operator (via std::copy()) since it tried to remove sets that were not properly initialized and contained dirty incoherent data. Increase the capacity of the vector to the desired one and insert a range of elements instead of copying them. BUG=b:200072742 TEST=FEATURES="test" emerge-brya gestures; test manually on Redrix Change-Id: I5ee121457a9033cfef8af28c2126e3566dd18a0f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/3732128 Tested-by: Angela Czubak <aczubak@google.com> Reviewed-by: Sean O'Brien <seobrien@chromium.org> Commit-Queue: Angela Czubak <aczubak@google.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/touchtests-report.json2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/touchtests-report.json b/tools/touchtests-report.json
index 0eaf63f..1abca41 100644
--- a/tools/touchtests-report.json
+++ b/tools/touchtests-report.json
@@ -536,7 +536,7 @@
"disabled": false,
"error": "",
"result": "success",
- "score": 0.9992150018215181
+ "score": 0.9998541145175693
},
"eve-1.0/3f-should-swipe-not-scroll-2": {
"description": "",