summaryrefslogtreecommitdiffstats
path: root/js/src/vm/RegExpObject.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-09 00:47:09 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:28 -0400
commit72f723f391e5bfb18649d3c26e781c2b0e28e328 (patch)
tree13bd3146fb3bcb8e9c9f8ee1ee781464355149f2 /js/src/vm/RegExpObject.h
parent2b0c3663441e51e7ec1fa32411e2339cf81e19b9 (diff)
downloadUXP-72f723f391e5bfb18649d3c26e781c2b0e28e328.tar
UXP-72f723f391e5bfb18649d3c26e781c2b0e28e328.tar.gz
UXP-72f723f391e5bfb18649d3c26e781c2b0e28e328.tar.lz
UXP-72f723f391e5bfb18649d3c26e781c2b0e28e328.tar.xz
UXP-72f723f391e5bfb18649d3c26e781c2b0e28e328.zip
1320408 - Part 23: Change RegExpObject::{getShared,createShared,dumpBytecode} to static method.
Diffstat (limited to 'js/src/vm/RegExpObject.h')
-rw-r--r--js/src/vm/RegExpObject.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
index dc428a973..f1ea101ed 100644
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -483,7 +483,8 @@ class RegExpObject : public NativeObject
static bool isOriginalFlagGetter(JSNative native, RegExpFlag* mask);
- bool getShared(JSContext* cx, RegExpGuard* g);
+ static MOZ_MUST_USE bool getShared(JSContext* cx, Handle<RegExpObject*> regexp,
+ RegExpGuard* g);
void setShared(RegExpShared& shared) {
MOZ_ASSERT(!maybeShared());
@@ -500,7 +501,8 @@ class RegExpObject : public NativeObject
void initAndZeroLastIndex(HandleAtom source, RegExpFlag flags, ExclusiveContext* cx);
#ifdef DEBUG
- bool dumpBytecode(JSContext* cx, bool match_only, HandleLinearString input);
+ static MOZ_MUST_USE bool dumpBytecode(JSContext* cx, Handle<RegExpObject*> regexp,
+ bool match_only, HandleLinearString input);
#endif
private:
@@ -508,7 +510,8 @@ class RegExpObject : public NativeObject
* Precondition: the syntax for |source| has already been validated.
* Side effect: sets the private field.
*/
- bool createShared(JSContext* cx, RegExpGuard* g);
+ static MOZ_MUST_USE bool createShared(JSContext* cx, Handle<RegExpObject*> regexp,
+ RegExpGuard* g);
RegExpShared* maybeShared() const {
return static_cast<RegExpShared*>(NativeObject::getPrivate(PRIVATE_SLOT));
}
@@ -531,7 +534,7 @@ inline bool
RegExpToShared(JSContext* cx, HandleObject obj, RegExpGuard* g)
{
if (obj->is<RegExpObject>())
- return obj->as<RegExpObject>().getShared(cx, g);
+ return RegExpObject::getShared(cx, obj.as<RegExpObject>(), g);
return Proxy::regexp_toShared(cx, obj, g);
}