gecko-dev/testing/profiles
Nicholas Nethercote 42f4510bf1 Bug 1424030 - Fix integer overflow of places.database.lastMaintenance in testing/profiles/prefs_general.js. r=standard8.
Bug 1382444 added this line to testing/profiles/prefs_general.js:

> user_pref("places.database.lastMaintenance", 7258114800);

(7258114800 seconds after 1970 is the start of the year 2200.)

libpref stores integers prefs as int32_t and the current parser doesn't detect
overflow. So this overflows to -1331819792. (I detected this with the new prefs
parser from bug 1423840, which does detect integer overflow.) As a result the
condition testing this pref in
toolkit/components/places/PlacesCategoriesStarter.js ends up always succeeding
in tests, which is the exact opposite of what was intended.

This patch changes it to 2147483647 (the year 2038), the maximum int32_t value.

MozReview-Commit-ID: LJQmMqQ9hFL

--HG--
extra : rebase_source : 84339c8e721abd47cb3cc85c3923a04417b1bbee
2017-12-08 06:47:28 +11:00
..
moz.build Bug 1326465 - add BUG_COMPONENTS to testing/. r=gbrown,ted 2016-12-30 16:16:56 -05:00
prefs_general.js Bug 1424030 - Fix integer overflow of places.database.lastMaintenance in testing/profiles/prefs_general.js. r=standard8. 2017-12-08 06:47:28 +11:00