зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1754235 - Narrow RegEx flag reads to corresponding size - r=iain
Differential Revision: https://phabricator.services.mozilla.com/D138166
This commit is contained in:
Родитель
20a964e3ea
Коммит
97b45e601b
|
@ -1979,8 +1979,9 @@ static void UpdateRegExpStatics(MacroAssembler& masm, Register regexp,
|
||||||
temp1, JSVAL_TYPE_PRIVATE_GCTHING);
|
temp1, JSVAL_TYPE_PRIVATE_GCTHING);
|
||||||
masm.loadPtr(Address(temp1, RegExpShared::offsetOfSource()), temp2);
|
masm.loadPtr(Address(temp1, RegExpShared::offsetOfSource()), temp2);
|
||||||
masm.storePtr(temp2, lazySourceAddress);
|
masm.storePtr(temp2, lazySourceAddress);
|
||||||
masm.load32(Address(temp1, RegExpShared::offsetOfFlags()), temp2);
|
static_assert(sizeof(JS::RegExpFlags) == 1, "load size must match flag size");
|
||||||
masm.store32(temp2, Address(staticsReg, RegExpStatics::offsetOfLazyFlags()));
|
masm.load8ZeroExtend(Address(temp1, RegExpShared::offsetOfFlags()), temp2);
|
||||||
|
masm.store8(temp2, Address(staticsReg, RegExpStatics::offsetOfLazyFlags()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prepare an InputOutputData and optional MatchPairs which space has been
|
// Prepare an InputOutputData and optional MatchPairs which space has been
|
||||||
|
|
Загрузка…
Ссылка в новой задаче