mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1013586 - Backout diagnostic patch 2e9bcf014247.
This commit is contained in:
parent
ab64cf27fc
commit
07f862be27
@ -436,8 +436,8 @@ RegExpObject::toString(JSContext *cx) const
|
||||
|
||||
/* RegExpShared */
|
||||
|
||||
RegExpShared::RegExpShared(JSCompartment *comp, JSAtom *source, RegExpFlag flags)
|
||||
: source(source), flags(flags), parenCount(0), canStringMatch(false), marked_(false), comp(comp)
|
||||
RegExpShared::RegExpShared(JSAtom *source, RegExpFlag flags)
|
||||
: source(source), flags(flags), parenCount(0), canStringMatch(false), marked_(false)
|
||||
{
|
||||
#ifdef JS_YARR
|
||||
bytecode = nullptr;
|
||||
@ -560,9 +560,6 @@ RegExpShared::compile(JSContext *cx, bool matchOnly, const jschar *sampleChars,
|
||||
bool
|
||||
RegExpShared::compile(JSContext *cx, HandleAtom pattern, bool matchOnly, const jschar *sampleChars, size_t sampleLength)
|
||||
{
|
||||
if (cx->compartment() != comp)
|
||||
MOZ_CRASH();
|
||||
|
||||
if (!ignoreCase() && !StringHasRegExpMetaChars(pattern->chars(), pattern->length())) {
|
||||
canStringMatch = true;
|
||||
parenCount = 0;
|
||||
@ -634,9 +631,6 @@ RegExpShared::compile(JSContext *cx, HandleAtom pattern, bool matchOnly, const j
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(!code.jitCode || !code.byteCode);
|
||||
jitCode = code.jitCode;
|
||||
|
||||
if (jitCode && jitCode->tenuredZone() != comp->zone())
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
|
||||
byteCode = code.byteCode;
|
||||
@ -978,9 +972,6 @@ RegExpCompartment::sweep(JSRuntime *rt)
|
||||
for (Set::Enum e(set_); !e.empty(); e.popFront()) {
|
||||
RegExpShared *shared = e.front();
|
||||
|
||||
if (this != &shared->compartment()->regExps)
|
||||
MOZ_CRASH();
|
||||
|
||||
// Sometimes RegExpShared instances are marked without the
|
||||
// compartment being subsequently cleared. This can happen if a GC is
|
||||
// restarted while in progress (i.e. performing a full GC in the
|
||||
@ -1013,9 +1004,6 @@ RegExpCompartment::sweep(JSRuntime *rt)
|
||||
bool
|
||||
RegExpCompartment::get(JSContext *cx, JSAtom *source, RegExpFlag flags, RegExpGuard *g)
|
||||
{
|
||||
if (this != &cx->compartment()->regExps)
|
||||
MOZ_CRASH();
|
||||
|
||||
Key key(source, flags);
|
||||
Set::AddPtr p = set_.lookupForAdd(key);
|
||||
if (p) {
|
||||
@ -1023,14 +1011,11 @@ RegExpCompartment::get(JSContext *cx, JSAtom *source, RegExpFlag flags, RegExpGu
|
||||
// from the table (which only holds weak references).
|
||||
MaybeTraceRegExpShared(cx, *p);
|
||||
|
||||
if ((*p)->compartment() != cx->compartment())
|
||||
MOZ_CRASH();
|
||||
|
||||
g->init(**p);
|
||||
return true;
|
||||
}
|
||||
|
||||
ScopedJSDeletePtr<RegExpShared> shared(cx->new_<RegExpShared>(cx->compartment(), source, flags));
|
||||
ScopedJSDeletePtr<RegExpShared> shared(cx->new_<RegExpShared>(source, flags));
|
||||
if (!shared)
|
||||
return false;
|
||||
|
||||
|
@ -147,8 +147,6 @@ class RegExpShared
|
||||
|
||||
#endif // JS_YARR
|
||||
|
||||
JSCompartment *comp;
|
||||
|
||||
// Tables referenced by JIT code.
|
||||
Vector<uint8_t *, 0, SystemAllocPolicy> tables;
|
||||
|
||||
@ -163,7 +161,7 @@ class RegExpShared
|
||||
#endif
|
||||
|
||||
public:
|
||||
RegExpShared(JSCompartment *comp, JSAtom *source, RegExpFlag flags);
|
||||
RegExpShared(JSAtom *source, RegExpFlag flags);
|
||||
~RegExpShared();
|
||||
|
||||
#ifdef JS_YARR
|
||||
@ -202,10 +200,6 @@ class RegExpShared
|
||||
|
||||
/* Accessors */
|
||||
|
||||
JSCompartment *compartment() const {
|
||||
return comp;
|
||||
}
|
||||
|
||||
size_t getParenCount() const {
|
||||
JS_ASSERT(isCompiled(true) || isCompiled(false) || canStringMatch);
|
||||
return parenCount;
|
||||
@ -463,10 +457,6 @@ class RegExpObject : public JSObject
|
||||
|
||||
void setShared(RegExpShared &shared) {
|
||||
JS_ASSERT(!maybeShared());
|
||||
if (maybeShared())
|
||||
MOZ_CRASH();
|
||||
if (shared.compartment() != compartment())
|
||||
MOZ_CRASH();
|
||||
JSObject::setPrivate(&shared);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user