зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
6e5171f082
Коммит
8512c64c65
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче