mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Disable potentially unsafe attempts at recovering JIT operations.
This commit is contained in:
parent
afefd0731b
commit
43a2299480
3 changed files with 2 additions and 40 deletions
|
|
@ -7064,10 +7064,8 @@ class MRegExpMatcher
|
|||
TRIVIAL_NEW_WRAPPERS
|
||||
NAMED_OPERANDS((0, regexp), (1, string), (2, lastIndex))
|
||||
|
||||
MOZ_MUST_USE bool writeRecoverData(CompactBufferWriter& writer) const override;
|
||||
|
||||
bool canRecoverOnBailout() const override {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool possiblyCalls() const override {
|
||||
|
|
@ -7102,7 +7100,7 @@ class MRegExpSearcher
|
|||
MOZ_MUST_USE bool writeRecoverData(CompactBufferWriter& writer) const override;
|
||||
|
||||
bool canRecoverOnBailout() const override {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool possiblyCalls() const override {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include "jsobj.h"
|
||||
#include "jsstr.h"
|
||||
|
||||
#include "builtin/RegExp.h"
|
||||
#include "builtin/TypedObject.h"
|
||||
|
||||
#include "gc/Heap.h"
|
||||
|
|
@ -1082,32 +1081,6 @@ RNaNToZero::recover(JSContext* cx, SnapshotIterator& iter) const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MRegExpMatcher::writeRecoverData(CompactBufferWriter& writer) const
|
||||
{
|
||||
MOZ_ASSERT(canRecoverOnBailout());
|
||||
writer.writeUnsigned(uint32_t(RInstruction::Recover_RegExpMatcher));
|
||||
return true;
|
||||
}
|
||||
|
||||
RRegExpMatcher::RRegExpMatcher(CompactBufferReader& reader)
|
||||
{}
|
||||
|
||||
bool
|
||||
RRegExpMatcher::recover(JSContext* cx, SnapshotIterator& iter) const
|
||||
{
|
||||
RootedObject regexp(cx, &iter.read().toObject());
|
||||
RootedString input(cx, iter.read().toString());
|
||||
int32_t lastIndex = iter.read().toInt32();
|
||||
|
||||
RootedValue result(cx);
|
||||
if (!RegExpMatcherRaw(cx, regexp, input, lastIndex, nullptr, &result))
|
||||
return false;
|
||||
|
||||
iter.storeInstructionResult(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MRegExpSearcher::writeRecoverData(CompactBufferWriter& writer) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ namespace jit {
|
|||
_(Random) \
|
||||
_(StringSplit) \
|
||||
_(NaNToZero) \
|
||||
_(RegExpMatcher) \
|
||||
_(RegExpSearcher) \
|
||||
_(RegExpTester) \
|
||||
_(StringReplace) \
|
||||
|
|
@ -486,14 +485,6 @@ class RNaNToZero final : public RInstruction
|
|||
bool recover(JSContext* cx, SnapshotIterator& iter) const;
|
||||
};
|
||||
|
||||
class RRegExpMatcher final : public RInstruction
|
||||
{
|
||||
public:
|
||||
RINSTRUCTION_HEADER_NUM_OP_(RegExpMatcher, 3)
|
||||
|
||||
MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const;
|
||||
};
|
||||
|
||||
class RRegExpSearcher final : public RInstruction
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue