Bug 1584006 - Construct a 64-bit value in ctypes code from two 32-bit values without potentially left-shifting a negative value. r=jorendorff

Differential Revision: https://phabricator.services.mozilla.com/D47182

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Walden 2019-10-17 15:24:31 +00:00
Родитель 6e5171f082
Коммит 8512c64c65
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -8694,7 +8694,7 @@ bool Int64::Join(JSContext* cx, unsigned argc, Value* vp) {
return ArgumentConvError(cx, args[1], "Int64.join", 1);
}
int64_t i = (int64_t(hi) << 32) + int64_t(lo);
int64_t i = mozilla::WrapToSigned((uint64_t(hi) << 32) + lo);
// Get Int64.prototype from the function's reserved slot.
JSObject* callee = &args.callee();