Issue #2083 - Part 2: Remove use of RegExpGuard.

Based on Mozilla bug 1345177.
There were more uses of RegExpGuard in js/src/builtin/RegExp.cpp not found in
 the original bug's patch.
This commit is contained in:
Job Bautista 2023-01-26 15:13:53 +08:00 committed by roytam1
commit d163d08cb2
21 changed files with 92 additions and 73 deletions

View file

@ -31,7 +31,7 @@ using JS::PrivateValue;
using JS::PropertyDescriptor;
using JS::Value;
using RegExpGuard = JS::Rooted<RegExpShared*>;
class RegExpShared;
class JS_FRIEND_API(Wrapper);
@ -328,7 +328,8 @@ class JS_FRIEND_API(BaseProxyHandler)
virtual bool isArray(JSContext* cx, HandleObject proxy, JS::IsArrayAnswer* answer) const;
virtual const char* className(JSContext* cx, HandleObject proxy) const;
virtual JSString* fun_toString(JSContext* cx, HandleObject proxy, bool isToSource) const;
virtual bool regexp_toShared(JSContext* cx, HandleObject proxy, RegExpGuard* g) const;
virtual bool regexp_toShared(JSContext* cx, HandleObject proxy,
MutableHandle<js::RegExpShared*> shared) const;
virtual bool boxedValue_unbox(JSContext* cx, HandleObject proxy, MutableHandleValue vp) const;
virtual void trace(JSTracer* trc, JSObject* proxy) const;
virtual void finalize(JSFreeOp* fop, JSObject* proxy) const;