Bug 1227144 - Remove unused AutoRegExpStaticsBuffer; r=jonco

This commit is contained in:
Terrence Cole 2015-12-16 08:40:13 -08:00
parent 1bbe9a982d
commit 7b495178c8

View File

@ -63,8 +63,6 @@ class RegExpStatics
struct InitBuffer {};
explicit RegExpStatics(InitBuffer) {}
friend class AutoRegExpStaticsBuffer;
public:
/* Mutators. */
inline void updateLazily(JSContext* cx, JSLinearString* input,
@ -160,38 +158,6 @@ class RegExpStatics
}
};
class MOZ_RAII AutoRegExpStaticsBuffer : private JS::CustomAutoRooter
{
public:
explicit AutoRegExpStaticsBuffer(JSContext* cx
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: CustomAutoRooter(cx), statics(RegExpStatics::InitBuffer())
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
}
RegExpStatics& getStatics() { return statics; }
private:
virtual void trace(JSTracer* trc) {
if (statics.matchesInput) {
TraceRoot(trc, reinterpret_cast<JSString**>(&statics.matchesInput),
"AutoRegExpStaticsBuffer matchesInput");
}
if (statics.lazySource) {
TraceRoot(trc, reinterpret_cast<JSString**>(&statics.lazySource),
"AutoRegExpStaticsBuffer lazySource");
}
if (statics.pendingInput) {
TraceRoot(trc, reinterpret_cast<JSString**>(&statics.pendingInput),
"AutoRegExpStaticsBuffer pendingInput");
}
}
RegExpStatics statics;
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};
inline bool
RegExpStatics::createDependent(JSContext* cx, size_t start, size_t end, MutableHandleValue out)
{